Class: HostradoAPI::Domain
- Inherits:
-
Object
- Object
- HostradoAPI::Domain
- Defined in:
- lib/domain.rb
Instance Attribute Summary collapse
-
#expires_on ⇒ Object
readonly
Returns the value of attribute expires_on.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tld ⇒ Object
readonly
Returns the value of attribute tld.
Instance Method Summary collapse
-
#initialize(domain_data = {}) ⇒ Domain
constructor
A new instance of Domain.
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_on ⇒ Object (readonly)
Returns the value of attribute expires_on.
6 7 8 |
# File 'lib/domain.rb', line 6 def expires_on @expires_on end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/domain.rb', line 3 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/domain.rb', line 4 def name @name end |
#tld ⇒ Object (readonly)
Returns the value of attribute tld.
5 6 7 |
# File 'lib/domain.rb', line 5 def tld @tld end |