Class: DNS::ResolveHost::Substitute::ResolveHost
- Inherits:
-
Object
- Object
- DNS::ResolveHost::Substitute::ResolveHost
- Defined in:
- lib/dns/resolve_host/substitute.rb
Instance Method Summary collapse
Instance Method Details
#call(hostname) ⇒ Object
9 10 11 |
# File 'lib/dns/resolve_host/substitute.rb', line 9 def call(hostname) map[hostname] end |
#map ⇒ Object
21 22 23 |
# File 'lib/dns/resolve_host/substitute.rb', line 21 def map @map ||= Hash.new { [] } end |
#set(hostname, ip_addresses) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dns/resolve_host/substitute.rb', line 13 def set(hostname, ip_addresses) ip_addresses = Array(ip_addresses) map[hostname] = ip_addresses ip_addresses end |