Class: Nib::History::Compose::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/nib/history/compose.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(volume_name, original_config) ⇒ Service

Returns a new instance of Service.



67
68
69
70
# File 'lib/nib/history/compose.rb', line 67

def initialize(volume_name, original_config)
  @original_config = original_config
  @volume_name = volume_name
end

Instance Attribute Details

#original_configObject (readonly)

Returns the value of attribute original_config.



65
66
67
# File 'lib/nib/history/compose.rb', line 65

def original_config
  @original_config
end

#volume_nameObject (readonly)

Returns the value of attribute volume_name.



65
66
67
# File 'lib/nib/history/compose.rb', line 65

def volume_name
  @volume_name
end

Instance Method Details

#configObject



72
73
74
75
76
# File 'lib/nib/history/compose.rb', line 72

def config
  original_config.merge(
    'volumes' => volumes_config | [history_config, rc_config]
  )
end