Module: DNS::Zonefile::ZonefileGrammar::ResourceRecord1
- Defined in:
- lib/dns/zonefile/parser.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
552
553
554
555
556
|
# File 'lib/dns/zonefile/parser.rb', line 552
def method_missing(method_name, *args)
if record.respond_to?(method_name)
record.send(method_name, *args)
end
end
|
Instance Method Details
#parse_type ⇒ Object
562
|
# File 'lib/dns/zonefile/parser.rb', line 562
def parse_type ; :record ; end
|
#record_type ⇒ Object
544
545
546
|
# File 'lib/dns/zonefile/parser.rb', line 544
def record_type
record.elements[4].text_value
end
|
#respond_to?(method_name) ⇒ Boolean
558
559
560
|
# File 'lib/dns/zonefile/parser.rb', line 558
def respond_to?(method_name)
super || record.respond_to?(method_name)
end
|
#to_s ⇒ Object
540
541
542
|
# File 'lib/dns/zonefile/parser.rb', line 540
def to_s
text_value
end
|
#ttl ⇒ Object
548
549
550
|
# File 'lib/dns/zonefile/parser.rb', line 548
def ttl
record.ttl || zone.variables['TTL'].to_i
end
|
#zone ⇒ Object
532
533
534
535
536
537
538
|
# File 'lib/dns/zonefile/parser.rb', line 532
def zone
p = parent
while p.respond_to?(:parent) && p.parent
p = p.parent
end
p
end
|