Class: Splicer::Records::SRVRecord

Inherits:
Record
  • Object
show all
Defined in:
lib/splicer/records/srv_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, target, port, priority = 0, weight = 0, ttl = 300) ⇒ SRVRecord

Returns a new instance of SRVRecord.

Parameters:

  • name (String)

    the relative name

  • target (String)

    the host name(fqdn)

  • port (Integer)

    the port number

  • priority (String) (defaults to: 0)

    the priority

  • weight (Integer) (defaults to: 0)

    the weight

  • ttl (Integer) (defaults to: 300)

    the TTL in seconds



13
14
15
16
17
18
19
# File 'lib/splicer/records/srv_record.rb', line 13

def initialize(name, target, port, priority=0, weight=0, ttl=300)
  super(name, ttl)
  @target = target
  @port = port
  @priority = priority
  @weight = weight
end

Instance Attribute Details

#portObject

Returns the value of attribute port.



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

def port
  @port
end

#priorityObject

Returns the value of attribute priority.



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

def priority
  @priority
end

#targetObject

Returns the value of attribute target.



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

def target
  @target
end

#weightObject

Returns the value of attribute weight.



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

def weight
  @weight
end

Instance Method Details

#typeObject



21
22
23
# File 'lib/splicer/records/srv_record.rb', line 21

def type
  'SRV'
end