Class: DNS::Zonefile::Record
- Inherits:
-
Object
- Object
- DNS::Zonefile::Record
- Defined in:
- lib/dns/zonefile.rb
Instance Attribute Summary collapse
- #klass ⇒ Object
-
#ttl ⇒ Object
readonly
Returns the value of attribute ttl.
Class Method Summary collapse
-
.writer_for_ttl(*attribs) ⇒ Object
assign, with handling for global TTL.
Instance Attribute Details
#klass ⇒ Object
88 89 90 91 |
# File 'lib/dns/zonefile.rb', line 88 def klass @klass = nil if @klass == "" @klass ||= "IN" end |
#ttl ⇒ Object (readonly)
Returns the value of attribute ttl.
84 85 86 |
# File 'lib/dns/zonefile.rb', line 84 def ttl @ttl end |
Class Method Details
.writer_for_ttl(*attribs) ⇒ Object
assign, with handling for global TTL
76 77 78 79 80 81 82 |
# File 'lib/dns/zonefile.rb', line 76 def self.writer_for_ttl(*attribs) attribs.each do |attrib| define_method "#{attrib}=" do |val| instance_variable_set("@#{attrib}", val || @vars["ttl"]) end end end |