Class: DNS::Monitor::Domain
- Inherits:
-
Struct
- Object
- Struct
- DNS::Monitor::Domain
- Defined in:
- lib/dns/monitor/domain.rb
Overview
It’s handy to be able to refer to Domains as objects
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rdap ⇒ Object
Returns the value of attribute rdap.
Instance Method Summary collapse
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at
5 6 7 |
# File 'lib/dns/monitor/domain.rb', line 5 def created_at @created_at end |
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/dns/monitor/domain.rb', line 5 def name @name end |
#rdap ⇒ Object
Returns the value of attribute rdap
5 6 7 |
# File 'lib/dns/monitor/domain.rb', line 5 def rdap @rdap end |
Instance Method Details
#to_parsed_h ⇒ Object
6 7 8 |
# File 'lib/dns/monitor/domain.rb', line 6 def to_parsed_h to_h.merge(rdap: JSON.parse(self.rdap)) end |
#to_s ⇒ Object
10 11 12 |
# File 'lib/dns/monitor/domain.rb', line 10 def to_s to_parsed_h.to_json end |