Class: IceStorm::LinkInfo
- Inherits:
-
Object
- Object
- IceStorm::LinkInfo
- 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.
- #inspect ⇒ Object
Constructor Details
#initialize(theTopic = nil, name = '', cost = 0) ⇒ LinkInfo
Returns a new instance of LinkInfo.
36 37 38 39 40 |
# File 'lib/IceStorm/IceStorm.rb', line 36 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.
66 67 68 |
# File 'lib/IceStorm/IceStorm.rb', line 66 def cost @cost end |
#name ⇒ Object
Returns the value of attribute name.
66 67 68 |
# File 'lib/IceStorm/IceStorm.rb', line 66 def name @name end |
#theTopic ⇒ Object
Returns the value of attribute theTopic.
66 67 68 |
# File 'lib/IceStorm/IceStorm.rb', line 66 def theTopic @theTopic end |
Instance Method Details
#==(other) ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/IceStorm/IceStorm.rb', line 50 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
58 59 60 |
# File 'lib/IceStorm/IceStorm.rb', line 58 def eql?(other) return other.class == self.class && other == self end |
#hash ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/IceStorm/IceStorm.rb', line 42 def hash _h = 0 _h = 5 * _h + @theTopic.hash _h = 5 * _h + @name.hash _h = 5 * _h + @cost.hash _h % 0x7fffffff end |
#inspect ⇒ Object
62 63 64 |
# File 'lib/IceStorm/IceStorm.rb', line 62 def inspect ::Ice::__stringify(self, T_LinkInfo) end |