Class: Chamber::Commands::Compare

Inherits:
Base
  • Object
show all
Includes:
Comparable
Defined in:
lib/chamber/commands/compare.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#chamber, #dry_run, #rootpath, #shell

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Comparable

#call

Constructor Details

#initialize(options = {}) ⇒ Compare

Returns a new instance of Compare.



19
20
21
22
23
24
25
26
27
# File 'lib/chamber/commands/compare.rb', line 19

def initialize(options = {})
  super

  first_settings_options        = options.merge(namespaces: options[:first])
  self.first_settings_instance  = Chamber::Instance.new(first_settings_options)

  second_settings_options       = options.merge(namespaces: options[:second])
  self.second_settings_instance = Chamber::Instance.new(second_settings_options)
end

Instance Attribute Details

#first_settings_instanceObject

Returns the value of attribute first_settings_instance.



12
13
14
# File 'lib/chamber/commands/compare.rb', line 12

def first_settings_instance
  @first_settings_instance
end

#second_settings_instanceObject

Returns the value of attribute second_settings_instance.



12
13
14
# File 'lib/chamber/commands/compare.rb', line 12

def second_settings_instance
  @second_settings_instance
end

Class Method Details

.call(options = {}) ⇒ Object



15
16
17
# File 'lib/chamber/commands/compare.rb', line 15

def self.call(options = {})
  new(options).call
end