Class: IceStorm::LinkInfo
- Inherits:
-
Object
- Object
- IceStorm::LinkInfo
- Includes:
- Ice::Inspect_mixin
- Defined in:
- lib/IceStorm/IceStorm.rb
Instance Attribute Summary collapse
-
#cost ⇒ Object
Returns the value of attribute cost.
-
#name ⇒ Object
Returns the value of attribute name.
-
#theTopic ⇒ Object
Returns the value of attribute theTopic.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(theTopic = nil, name = '', cost = 0) ⇒ LinkInfo
constructor
A new instance of LinkInfo.
Methods included from Ice::Inspect_mixin
Constructor Details
#initialize(theTopic = nil, name = '', cost = 0) ⇒ LinkInfo
Returns a new instance of LinkInfo.
32 33 34 35 36 |
# File 'lib/IceStorm/IceStorm.rb', line 32 def initialize(theTopic=nil, name='', cost=0) @theTopic = theTopic @name = name @cost = cost end |
Instance Attribute Details
#cost ⇒ Object
Returns the value of attribute cost.
58 59 60 |
# File 'lib/IceStorm/IceStorm.rb', line 58 def cost @cost end |
#name ⇒ Object
Returns the value of attribute name.
58 59 60 |
# File 'lib/IceStorm/IceStorm.rb', line 58 def name @name end |
#theTopic ⇒ Object
Returns the value of attribute theTopic.
58 59 60 |
# File 'lib/IceStorm/IceStorm.rb', line 58 def theTopic @theTopic end |
Instance Method Details
#==(other) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/IceStorm/IceStorm.rb', line 46 def ==(other) return false if !other.is_a? ::IceStorm::LinkInfo or @theTopic != other.theTopic or @name != other.name or @cost != other.cost true end |
#eql?(other) ⇒ Boolean
54 55 56 |
# File 'lib/IceStorm/IceStorm.rb', line 54 def eql?(other) return other.class == self.class && other == self end |
#hash ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/IceStorm/IceStorm.rb', line 38 def hash _h = 0 _h = 5 * _h + @theTopic.hash _h = 5 * _h + @name.hash _h = 5 * _h + @cost.hash _h % 0x7fffffff end |