Class: Reflex::Packager::Profile
- Inherits:
-
Object
- Object
- Reflex::Packager::Profile
- Defined in:
- lib/reflex/packager/profile.rb
Overview
Describes the runtime a packaged app embeds: the umbrella pod that provides the native build, the extensions and libraries registered with CRuby, and the scaffold for the 'new' command.
The packager itself is runtime-agnostic; each gem (reflex, rubysketch, ...) supplies its own profile and reuses this packager as the engine.
Instance Attribute Summary collapse
-
#boot ⇒ Object
readonly
Returns the value of attribute boot.
-
#config_files ⇒ Object
readonly
Returns the value of attribute config_files.
-
#extensions ⇒ Object
readonly
Returns the value of attribute extensions.
-
#git ⇒ Object
readonly
Returns the value of attribute git.
-
#libraries ⇒ Object
readonly
Returns the value of attribute libraries.
-
#pod ⇒ Object
readonly
Returns the value of attribute pod.
-
#templates ⇒ Object
readonly
Returns the value of attribute templates.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #boot_main ⇒ Object
- #bundle_id_prefix ⇒ Object
- #command ⇒ Object
-
#initialize(pod:, git:, version:, libraries:, extensions:, config_files:, templates:, command: nil, boot: nil) ⇒ Profile
constructor
A new instance of Profile.
- #main ⇒ Object
- #pod_key ⇒ Object
Constructor Details
#initialize(pod:, git:, version:, libraries:, extensions:, config_files:, templates:, command: nil, boot: nil) ⇒ Profile
Returns a new instance of Profile.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/reflex/packager/profile.rb', line 26 def initialize( pod:, git:, version:, libraries:, extensions:, config_files:, templates:, command: nil, boot: nil) @pod = pod @git = git @version = version @libraries = libraries @extensions = extensions @config_files = config_files @templates = templates @command = command @boot = boot end |
Instance Attribute Details
#boot ⇒ Object (readonly)
Returns the value of attribute boot.
41 42 43 |
# File 'lib/reflex/packager/profile.rb', line 41 def boot @boot end |
#config_files ⇒ Object (readonly)
Returns the value of attribute config_files.
41 42 43 |
# File 'lib/reflex/packager/profile.rb', line 41 def config_files @config_files end |
#extensions ⇒ Object (readonly)
Returns the value of attribute extensions.
41 42 43 |
# File 'lib/reflex/packager/profile.rb', line 41 def extensions @extensions end |
#git ⇒ Object (readonly)
Returns the value of attribute git.
41 42 43 |
# File 'lib/reflex/packager/profile.rb', line 41 def git @git end |
#libraries ⇒ Object (readonly)
Returns the value of attribute libraries.
41 42 43 |
# File 'lib/reflex/packager/profile.rb', line 41 def libraries @libraries end |
#pod ⇒ Object (readonly)
Returns the value of attribute pod.
41 42 43 |
# File 'lib/reflex/packager/profile.rb', line 41 def pod @pod end |
#templates ⇒ Object (readonly)
Returns the value of attribute templates.
41 42 43 |
# File 'lib/reflex/packager/profile.rb', line 41 def templates @templates end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
41 42 43 |
# File 'lib/reflex/packager/profile.rb', line 41 def version @version end |
Instance Method Details
#boot_main ⇒ Object
52 53 54 |
# File 'lib/reflex/packager/profile.rb', line 52 def boot_main() @boot ? '__reflex_main__.rb' : nil end |
#bundle_id_prefix ⇒ Object
60 61 62 |
# File 'lib/reflex/packager/profile.rb', line 60 def bundle_id_prefix() "org.xord.#{pod_key}" end |
#command ⇒ Object
44 45 46 |
# File 'lib/reflex/packager/profile.rb', line 44 def command() @command || pod_key end |
#main ⇒ Object
48 49 50 |
# File 'lib/reflex/packager/profile.rb', line 48 def main() templates.keys.first end |
#pod_key ⇒ Object
56 57 58 |
# File 'lib/reflex/packager/profile.rb', line 56 def pod_key() pod.downcase.to_sym end |