Class: DNS::Monitor::Domain

Inherits:
Struct
  • Object
show all
Defined in:
lib/dns/monitor/domain.rb

Overview

It’s handy to be able to refer to Domains as objects

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



5
6
7
# File 'lib/dns/monitor/domain.rb', line 5

def created_at
  @created_at
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/dns/monitor/domain.rb', line 5

def name
  @name
end

#rdapObject

Returns the value of attribute rdap

Returns:

  • (Object)

    the current value of rdap



5
6
7
# File 'lib/dns/monitor/domain.rb', line 5

def rdap
  @rdap
end

Instance Method Details

#to_parsed_hObject



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_sObject



10
11
12
# File 'lib/dns/monitor/domain.rb', line 10

def to_s
  to_parsed_h.to_json
end