Module: EySecrets::CommandBuilder

Included in:
CopyFiles, Restart
Defined in:
lib/ey_secrets/command_builder.rb

Instance Method Summary collapse

Instance Method Details

#commandsObject



11
12
13
14
15
# File 'lib/ey_secrets/command_builder.rb', line 11

def commands
  @commands = []
  build
  @commands
end

#scp(source, destination) ⇒ Object



3
4
5
# File 'lib/ey_secrets/command_builder.rb', line 3

def scp(source, destination)
  @commands << "scp #{source} #{instance.user_name}@#{instance.host_name}:#{destination}"
end

#ssh(command) ⇒ Object



7
8
9
# File 'lib/ey_secrets/command_builder.rb', line 7

def ssh(command)
  @commands << "ssh #{instance.user_name}@#{instance.host_name} \"#{command}\""
end