Class: FTW::DNS::Hash
- Inherits:
-
Object
- Object
- FTW::DNS::Hash
- Defined in:
- lib/ftw/dns/hash.rb
Overview
Provide resolution name -> address mappings through hash lookups
Instance Method Summary collapse
-
#resolve(hostname) ⇒ Object
Resolve a hostname.
Instance Method Details
#resolve(hostname) ⇒ Object
Resolve a hostname.
It will return an array of all known addresses for the host.
17 18 19 20 21 22 |
# File 'lib/ftw/dns/hash.rb', line 17 def resolve(hostname) result = @data[hostname] return nil if result.nil? return result if result.is_a?(Array) return [result] end |