Class: Zonesync::Zonefile::Record

Inherits:
Object
  • Object
show all
Defined in:
lib/zonesync/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

#commentObject

Returns the value of attribute comment.



92
93
94
# File 'lib/zonesync/zonefile.rb', line 92

def comment
  @comment
end

#klassObject



87
88
89
90
# File 'lib/zonesync/zonefile.rb', line 87

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

#ttlObject (readonly)

Returns the value of attribute ttl.



83
84
85
# File 'lib/zonesync/zonefile.rb', line 83

def ttl
  @ttl
end

Class Method Details

.writer_for_ttl(*attribs) ⇒ Object

assign, with handling for global TTL



75
76
77
78
79
80
81
# File 'lib/zonesync/zonefile.rb', line 75

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