Class: Scriptroute::Tulip::TraceHop
- Inherits:
-
Object
- Object
- Scriptroute::Tulip::TraceHop
- Defined in:
- lib/scriptroute/tulip/helper.rb
Overview
a traceroute hop ##################
Constant Summary collapse
- @@aliasTesting =
false
Instance Attribute Summary collapse
-
#dst ⇒ Object
readonly
Returns the value of attribute dst.
-
#hop ⇒ Object
readonly
Returns the value of attribute hop.
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#==(another) ⇒ Object
todo: set this right.
-
#initialize(hop, ip, dst, name = ip) ⇒ TraceHop
constructor
A new instance of TraceHop.
- #to_s ⇒ Object
Constructor Details
#initialize(hop, ip, dst, name = ip) ⇒ TraceHop
Returns a new instance of TraceHop.
593 594 595 596 597 598 |
# File 'lib/scriptroute/tulip/helper.rb', line 593 def initialize (hop, ip, dst, name=ip) @hop = hop; @ip = ip; @dst = dst; @name = name; end |
Instance Attribute Details
#dst ⇒ Object (readonly)
Returns the value of attribute dst.
592 593 594 |
# File 'lib/scriptroute/tulip/helper.rb', line 592 def dst @dst end |
#hop ⇒ Object (readonly)
Returns the value of attribute hop.
592 593 594 |
# File 'lib/scriptroute/tulip/helper.rb', line 592 def hop @hop end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
592 593 594 |
# File 'lib/scriptroute/tulip/helper.rb', line 592 def ip @ip end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
592 593 594 |
# File 'lib/scriptroute/tulip/helper.rb', line 592 def name @name end |
Instance Method Details
#==(another) ⇒ Object
todo: set this right
601 602 603 604 605 |
# File 'lib/scriptroute/tulip/helper.rb', line 601 def == (another) return true if (@ip == another.ip); return AliasResolution.aliases(self, another) if (@@aliasTesting); return false; end |
#to_s ⇒ Object
607 608 609 |
# File 'lib/scriptroute/tulip/helper.rb', line 607 def to_s return "#{@hop.to_s} #{@name.to_s} (#{@ip.to_s})"; end |