Class: Splicer::DnsMadeEasy::Record

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Record

Returns a new instance of Record.



6
7
8
9
10
11
12
# File 'lib/splicer/dns_made_easy/record.rb', line 6

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

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



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

def data
  @data
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#ttlObject (readonly)

Returns the value of attribute ttl.



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

def ttl
  @ttl
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Instance Method Details

#id?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/splicer/dns_made_easy/record.rb', line 14

def id?
  !!@id
end