class Matchd::Rule::Fail
Public Class Methods
new(options)
click to toggle source
Calls superclass method
Matchd::Rule::new
# File lib/matchd/rule/fail.rb, line 2 def initialize(options) super @fail = options.fetch("fail") end
Public Instance Methods
rcode()
click to toggle source
# File lib/matchd/rule/fail.rb, line 11 def rcode @rcode ||= case @fail when Symbol, String then Resolv::DNS::RCode.const_get(@fail) else @fail end end
visit!(_server, _name, _resource_class, transaction)
click to toggle source
# File lib/matchd/rule/fail.rb, line 7 def visit!(_server, _name, _resource_class, transaction) transaction.fail!(rcode) end