Class: Splicer::DnsMadeEasy::Domain

Inherits:
Object
  • Object
show all
Defined in:
lib/splicer/dns_made_easy/domain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Domain

Returns a new instance of Domain.



7
8
9
10
# File 'lib/splicer/dns_made_easy/domain.rb', line 7

def initialize(params={})
  @id = params['id']
  @data = params
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/splicer/dns_made_easy/domain.rb', line 5

def data
  @data
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/splicer/dns_made_easy/domain.rb', line 5

def id
  @id
end

Instance Method Details

#persisted?Boolean Also known as: id?

Returns:

  • (Boolean)


12
13
14
# File 'lib/splicer/dns_made_easy/domain.rb', line 12

def persisted?
  !!@id
end