Class: Splicer::Records::MXRecord

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

Instance Attribute Summary collapse

Attributes inherited from Record

#name, #ttl

Instance Method Summary collapse

Methods inherited from Record

#name?

Constructor Details

#initialize(name, exchanger, priority = 0, ttl = 300) ⇒ MXRecord

Returns a new instance of MXRecord.

Parameters:

  • name (String)

    the relative name

  • exchanger (String)

    the mail exchanger(fqdn)

  • priority (Integer) (defaults to: 0)

    the priority

  • ttl (Integer) (defaults to: 300)

    the TTL in seconds



11
12
13
14
15
# File 'lib/splicer/records/mx_record.rb', line 11

def initialize(name, exchanger, priority=0, ttl=300)
  super(name, ttl)
  @exchanger = exchanger
  @priority = priority
end

Instance Attribute Details

#exchangerObject

Returns the value of attribute exchanger.



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

def exchanger
  @exchanger
end

#priorityObject

Returns the value of attribute priority.



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

def priority
  @priority
end

Instance Method Details

#typeObject



17
18
19
# File 'lib/splicer/records/mx_record.rb', line 17

def type
  'MX'
end