Class: Okura::Feature

Inherits:
Object
  • Object
show all
Defined in:
lib/okura.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject (readonly)

Returns the value of attribute id.



243
244
245
# File 'lib/okura.rb', line 243

def id
  @id
end

#textObject (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

#hashObject



251
252
253
# File 'lib/okura.rb', line 251

def hash
  self.id.hash
end

#to_sObject



245
246
247
# File 'lib/okura.rb', line 245

def to_s
  "Feature(#{id},#{text})"
end