Class: Sshster::Actions::Compose

Inherits:
Base
  • Object
show all
Defined in:
lib/sshster/actions/compose.rb

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Sshster::Actions::Base

Instance Method Details

#runObject



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/sshster/actions/compose.rb', line 4

def run
  @host_names = []
  @projects = []
  compile_projects
  File.write(config_path, File.read(origin_config_path))
  open(config_path, 'a') do |f|
    f << "\n\n # === GENERATED === # \n\n"
    @projects.map do |project|
      compile_project(project, f)
      f << "\n\n"
    end
  end
end