Class: Verneuil::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/verneuil/address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ip, generator = nil) ⇒ Address

Returns a new instance of Address.



5
6
7
8
# File 'lib/verneuil/address.rb', line 5

def initialize(ip, generator=nil)
  @ip = ip
  @generator = generator
end

Instance Attribute Details

#ipObject

Returns the value of attribute ip.



3
4
5
# File 'lib/verneuil/address.rb', line 3

def ip
  @ip
end

Instance Method Details

#==(other) ⇒ Object



18
19
20
# File 'lib/verneuil/address.rb', line 18

def ==(other)
  self.ip == other.ip
end

#inspectObject



10
11
12
# File 'lib/verneuil/address.rb', line 10

def inspect
  "-> #{ip}"
end

#resolveObject



14
15
16
# File 'lib/verneuil/address.rb', line 14

def resolve
  @generator.resolve(self)
end