Class: Srvy::Host

Inherits:
Object
  • Object
show all
Defined in:
lib/srvy/host.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, port, weight, priority, ttl) ⇒ Host

Returns a new instance of Host.



10
11
12
13
14
15
16
# File 'lib/srvy/host.rb', line 10

def initialize(host, port, weight, priority, ttl)
  @host     = host
  @port     = port
  @weight   = weight
  @priority = priority
  @ttl      = ttl
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



4
5
6
# File 'lib/srvy/host.rb', line 4

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



5
6
7
# File 'lib/srvy/host.rb', line 5

def port
  @port
end

#priorityObject (readonly)

Returns the value of attribute priority.



7
8
9
# File 'lib/srvy/host.rb', line 7

def priority
  @priority
end

#ttlObject (readonly)

Returns the value of attribute ttl.



8
9
10
# File 'lib/srvy/host.rb', line 8

def ttl
  @ttl
end

#weightObject (readonly)

Returns the value of attribute weight.



6
7
8
# File 'lib/srvy/host.rb', line 6

def weight
  @weight
end