Class: Nib::History::Compose
- Inherits:
-
Object
- Object
- Nib::History::Compose
- Defined in:
- lib/nib/history/compose.rb
Defined Under Namespace
Classes: Service, Services, Volumes
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#volume_name ⇒ Object
readonly
Returns the value of attribute volume_name.
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize ⇒ Compose
constructor
A new instance of Compose.
- #path ⇒ Object
Constructor Details
#initialize ⇒ Compose
Returns a new instance of Compose.
7 8 9 10 11 12 |
# File 'lib/nib/history/compose.rb', line 7 def initialize @volume_name = 'nib_history' @dir = "#{Dir.tmpdir}/#{Dir.pwd.split('/').last}" FileUtils.mkdir_p(dir) end |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
5 6 7 |
# File 'lib/nib/history/compose.rb', line 5 def dir @dir end |
#volume_name ⇒ Object (readonly)
Returns the value of attribute volume_name.
5 6 7 |
# File 'lib/nib/history/compose.rb', line 5 def volume_name @volume_name end |
Instance Method Details
#config ⇒ Object
18 19 20 21 22 |
# File 'lib/nib/history/compose.rb', line 18 def config original_config .merge('services' => services_config) .merge('volumes' => volumes_config) end |
#path ⇒ Object
14 15 16 |
# File 'lib/nib/history/compose.rb', line 14 def path file.path end |