Class: Invoker::Power::DNS
- Inherits:
-
RubyDNS::Server
- Object
- RubyDNS::Server
- Invoker::Power::DNS
- Defined in:
- lib/invoker/power/dns.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ DNS
constructor
A new instance of DNS.
- #process(name, resource_class, transaction) ⇒ Object
Constructor Details
#initialize ⇒ DNS
Returns a new instance of DNS.
14 15 16 17 |
# File 'lib/invoker/power/dns.rb', line 14 def initialize @logger = ::Logger.new($stderr) @logger.level = ::Logger::FATAL end |
Class Method Details
Instance Method Details
#process(name, resource_class, transaction) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/invoker/power/dns.rb', line 19 def process(name, resource_class, transaction) if name_matches?(name) && resource_class_matches?(resource_class) transaction.respond!("127.0.0.1") else transaction.fail!(:NXDomain) end end |