Class: Okura::Feature
- Inherits:
-
Object
- Object
- Okura::Feature
- Defined in:
- lib/okura.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #hash ⇒ Object
-
#initialize(id, text) ⇒ Feature
constructor
A new instance of Feature.
- #to_s ⇒ Object
Constructor Details
#initialize(id, text) ⇒ Feature
Returns a new instance of Feature.
240 241 242 |
# File 'lib/okura.rb', line 240 def initialize id,text @id,@text=id,text end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
243 244 245 |
# File 'lib/okura.rb', line 243 def id @id end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
244 245 246 |
# File 'lib/okura.rb', line 244 def text @text end |
Instance Method Details
#==(other) ⇒ Object
248 249 250 |
# File 'lib/okura.rb', line 248 def == other return self.id==other.id end |
#hash ⇒ Object
251 252 253 |
# File 'lib/okura.rb', line 251 def hash self.id.hash end |
#to_s ⇒ Object
245 246 247 |
# File 'lib/okura.rb', line 245 def to_s "Feature(#{id},#{text})" end |