Class: JLDrill::Tanaka::Word
- Inherits:
-
Object
- Object
- JLDrill::Tanaka::Word
- Defined in:
- lib/jldrill/model/Tanaka.rb
Overview
Represents one of the words stored in the Tanaka library
Instance Attribute Summary collapse
-
#contents ⇒ Object
readonly
Returns the value of attribute contents.
Class Method Summary collapse
Instance Method Summary collapse
- #eql?(word) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(contents) ⇒ Word
constructor
A new instance of Word.
- #to_s ⇒ Object
Constructor Details
#initialize(contents) ⇒ Word
Returns a new instance of Word.
11 12 13 |
# File 'lib/jldrill/model/Tanaka.rb', line 11 def initialize(contents) @contents = contents end |
Instance Attribute Details
#contents ⇒ Object (readonly)
Returns the value of attribute contents.
9 10 11 |
# File 'lib/jldrill/model/Tanaka.rb', line 9 def contents @contents end |
Class Method Details
Instance Method Details
#eql?(word) ⇒ Boolean
27 28 29 |
# File 'lib/jldrill/model/Tanaka.rb', line 27 def eql?(word) return @contents.eql?(word.contents) end |
#hash ⇒ Object
31 32 33 |
# File 'lib/jldrill/model/Tanaka.rb', line 31 def hash @contents.hash end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/jldrill/model/Tanaka.rb', line 23 def to_s @contents end |