Class: DRbQS::SSHHost
- Inherits:
-
Object
- Object
- DRbQS::SSHHost
- Defined in:
- lib/drbqs/ssh/host.rb
Instance Method Summary collapse
- #get_options(name) ⇒ Object
-
#initialize ⇒ SSHHost
constructor
A new instance of SSHHost.
Constructor Details
#initialize ⇒ SSHHost
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 (name) if path = get(name) return [path, YAML.load_file(path)] end return [nil, {}] end |