Class: HostradoAPI::Domain

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain_data = {}) ⇒ Domain

Returns a new instance of Domain.



8
9
10
11
12
13
# File 'lib/domain.rb', line 8

def initialize(domain_data = {})
  @id         = domain_data['id'].to_i
  @name       = domain_data['name']
  @tld        = domain_data['tld']
  @expires_on = Date.parse(domain_data['expires_on'])
end

Instance Attribute Details

#expires_onObject (readonly)

Returns the value of attribute expires_on.



6
7
8
# File 'lib/domain.rb', line 6

def expires_on
  @expires_on
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/domain.rb', line 3

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/domain.rb', line 4

def name
  @name
end

#tldObject (readonly)

Returns the value of attribute tld.



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

def tld
  @tld
end