Class: Verneuil::Address
- Inherits:
-
Object
- Object
- Verneuil::Address
- Defined in:
- lib/verneuil/address.rb
Instance Attribute Summary collapse
-
#ip ⇒ Object
Returns the value of attribute ip.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(ip, generator = nil) ⇒ Address
constructor
A new instance of Address.
- #inspect ⇒ Object
- #resolve ⇒ Object
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
#ip ⇒ Object
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 |
#inspect ⇒ Object
10 11 12 |
# File 'lib/verneuil/address.rb', line 10 def inspect "-> #{ip}" end |
#resolve ⇒ Object
14 15 16 |
# File 'lib/verneuil/address.rb', line 14 def resolve @generator.resolve(self) end |