Class: IceStorm::LinkInfo
- Inherits:
-
Object
- Object
- IceStorm::LinkInfo
- Includes:
- Ice::Inspect_mixin
- Defined in:
- ruby/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.
18 19 20 21 22 |
# File 'ruby/IceStorm/IceStorm.rb', line 18 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.
44 45 46 |
# File 'ruby/IceStorm/IceStorm.rb', line 44 def cost @cost end |
#name ⇒ Object
Returns the value of attribute name.
44 45 46 |
# File 'ruby/IceStorm/IceStorm.rb', line 44 def name @name end |
#theTopic ⇒ Object
Returns the value of attribute theTopic.
44 45 46 |
# File 'ruby/IceStorm/IceStorm.rb', line 44 def theTopic @theTopic end |
Instance Method Details
#==(other) ⇒ Object
32 33 34 35 36 37 38 |
# File 'ruby/IceStorm/IceStorm.rb', line 32 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
40 41 42 |
# File 'ruby/IceStorm/IceStorm.rb', line 40 def eql?(other) return other.class == self.class && other == self end |
#hash ⇒ Object
24 25 26 27 28 29 30 |
# File 'ruby/IceStorm/IceStorm.rb', line 24 def hash _h = 0 _h = 5 * _h + @theTopic.hash _h = 5 * _h + @name.hash _h = 5 * _h + @cost.hash _h % 0x7fffffff end |