Class: Auger::Dns
- Inherits:
-
Connection
- Object
- Connection
- Auger::Dns
- Defined in:
- lib/plugins/dns.rb
Instance Attribute Summary
Attributes inherited from Connection
#connection, #options, #requests, #response, #roles
Instance Method Summary collapse
- #close(dns) ⇒ Object
- #domain(&block) ⇒ Object
- #open(host, options) ⇒ Object
- #query(name, &block) ⇒ Object
Methods inherited from Connection
#do_open, #initialize, load, #method_missing, #timeout
Constructor Details
This class inherits a constructor from Auger::Connection
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Auger::Connection
Instance Method Details
#close(dns) ⇒ Object
23 24 25 |
# File 'lib/plugins/dns.rb', line 23 def close(dns) dns = nil end |
#domain(&block) ⇒ Object
12 13 14 |
# File 'lib/plugins/dns.rb', line 12 def domain(&block) @requests << DnsDomainRequest.load(nil, &block) end |
#open(host, options) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/plugins/dns.rb', line 16 def open(host, ) [:nameserver] = host dns = Net::DNS::Resolver.new() dns.use_tcp = true if [:use_tcp] dns end |
#query(name, &block) ⇒ Object
27 28 29 |
# File 'lib/plugins/dns.rb', line 27 def query(name, &block) @requests << DnsQueryRequest.load(name, &block) end |