Class: Fig::Command::PackageApplier
- Inherits:
-
Object
- Object
- Fig::Command::PackageApplier
- Defined in:
- lib/fig/command/package_applier.rb
Instance Attribute Summary collapse
-
#synthetic_package_for_command_line ⇒ Object
readonly
Returns the value of attribute synthetic_package_for_command_line.
Instance Method Summary collapse
- #activate_retrieves ⇒ Object
- #apply_config_to_environment(ignore_base_config) ⇒ Object
-
#initialize(base_package, environment, options, descriptor, base_config, package_source_description) ⇒ PackageApplier
constructor
A new instance of PackageApplier.
- #register_package_with_environment ⇒ Object
Constructor Details
#initialize(base_package, environment, options, descriptor, base_config, package_source_description) ⇒ PackageApplier
Returns a new instance of PackageApplier.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/fig/command/package_applier.rb', line 12 def initialize( base_package, environment, , descriptor, base_config, package_source_description ) @base_package = base_package @environment = environment @options = @descriptor = descriptor @base_config = base_config @package_source_description = package_source_description end |
Instance Attribute Details
#synthetic_package_for_command_line ⇒ Object (readonly)
Returns the value of attribute synthetic_package_for_command_line.
10 11 12 |
# File 'lib/fig/command/package_applier.rb', line 10 def synthetic_package_for_command_line @synthetic_package_for_command_line end |
Instance Method Details
#activate_retrieves ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/fig/command/package_applier.rb', line 28 def activate_retrieves() @base_package.retrieves.each do |statement| @environment.add_retrieve(statement) end return end |
#apply_config_to_environment(ignore_base_config) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/fig/command/package_applier.rb', line 42 def apply_config_to_environment(ignore_base_config) begin @synthetic_package_for_command_line = (ignore_base_config) @environment.apply_config( @synthetic_package_for_command_line, Fig::Package::DEFAULT_CONFIG, nil ) rescue Fig::NoSuchPackageConfigError => exception make_no_such_package_exception_descriptive(exception) end return end |
#register_package_with_environment ⇒ Object
36 37 38 39 40 |
# File 'lib/fig/command/package_applier.rb', line 36 def register_package_with_environment() @environment.register_package(@base_package) return end |