Class: DRbQS::SSHHost

Inherits:
Object
  • Object
show all
Defined in:
lib/drbqs/ssh/host.rb

Instance Method Summary collapse

Constructor Details

#initializeSSHHost

Returns a new instance of SSHHost.



6
7
8
9
# File 'lib/drbqs/ssh/host.rb', line 6

def initialize
  @dir = DRbQS::Config.get_host_file_directory
  @host_files = (Dir.glob("#{@dir}/*.yaml") + Dir.glob("#{@dir}/*.yml")).map { |s| File.basename(s) }
end

Instance Method Details

#get_options(name) ⇒ Object



19
20
21
22
23
24
# File 'lib/drbqs/ssh/host.rb', line 19

def get_options(name)
  if path = get(name)
    return [path, YAML.load_file(path)]
  end
  return [nil, {}]
end