Class: GrokCLI::Docker::Configure

Inherits:
Object
  • Object
show all
Defined in:
lib/grok_cli/docker/configure.rb

Instance Method Summary collapse

Instance Method Details

#execute(machine_name, hostname) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/grok_cli/docker/configure.rb', line 3

def execute(machine_name, hostname)
  body = <<~BODY
    machine_name: #{machine_name}
    hostname: #{hostname}
    BODY

  File.open('.grok-cli.yml', 'w') do |f|
    f.write(body)
  end

  puts "Created the file \".grok-cli.yml\"\n\n#{body}"
end