Class: Glare::DnsRecord
- Inherits:
-
Object
- Object
- Glare::DnsRecord
- Defined in:
- lib/glare/dns_record.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#proxied ⇒ Object
readonly
Returns the value of attribute proxied.
-
#ttl ⇒ Object
readonly
Returns the value of attribute ttl.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(dns_record) ⇒ Object
-
#initialize(name:, type:, content:, proxied:, ttl:) ⇒ DnsRecord
constructor
A new instance of DnsRecord.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, type:, content:, proxied:, ttl:) ⇒ DnsRecord
Returns a new instance of DnsRecord.
3 4 5 6 7 8 9 |
# File 'lib/glare/dns_record.rb', line 3 def initialize(name:, type:, content:, proxied:, ttl: ) @name = name @type = type @content = content @proxied = proxied @ttl = ttl end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
29 30 31 |
# File 'lib/glare/dns_record.rb', line 29 def content @content end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
29 30 31 |
# File 'lib/glare/dns_record.rb', line 29 def name @name end |
#proxied ⇒ Object (readonly)
Returns the value of attribute proxied.
29 30 31 |
# File 'lib/glare/dns_record.rb', line 29 def proxied @proxied end |
#ttl ⇒ Object (readonly)
Returns the value of attribute ttl.
29 30 31 |
# File 'lib/glare/dns_record.rb', line 29 def ttl @ttl end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
29 30 31 |
# File 'lib/glare/dns_record.rb', line 29 def type @type end |
Instance Method Details
#==(dns_record) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/glare/dns_record.rb', line 21 def ==(dns_record) @type == dns_record.type && @name == dns_record.name && @content == dns_record.content && @proxied == dns_record.proxied && @ttl == dns_record.ttl end |
#to_h ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/glare/dns_record.rb', line 11 def to_h { type: @type, name: @name, content: @content, proxied: @proxied, ttl: @ttl } end |