Class: DNS::Zonefile::Record

Inherits:
Object
  • Object
show all
Defined in:
lib/dns/zonefile.rb

Direct Known Subclasses

A, CAA, CNAME, MX, NAPTR, NS, PTR, SOA, SRV, SSHFP, TXT

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#klassObject



88
89
90
91
# File 'lib/dns/zonefile.rb', line 88

def klass
  @klass = nil if @klass == ""
  @klass ||= "IN"
end

#ttlObject (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