Class: Splicer::Records::Record

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, ttl) ⇒ Record

Returns a new instance of Record.

Parameters:

  • name (String)

    the relative name

  • ttl (Integer)

    the TTL in seconds



9
10
11
12
# File 'lib/splicer/records/record.rb', line 9

def initialize(name, ttl)
  @name = name
  @ttl = ttl
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#ttlObject

Returns the value of attribute ttl.



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

def ttl
  @ttl
end

Instance Method Details

#name?Boolean

Check to see if the name is nil

Returns:

  • (Boolean)


16
17
18
# File 'lib/splicer/records/record.rb', line 16

def name?
  !!@name
end