Class: SingleWordDataSource
- Inherits:
-
BaseDataSource
- Object
- BaseDataSource
- SingleWordDataSource
- Defined in:
- lib/data/word_data_source.rb
Instance Attribute Summary
Attributes inherited from BaseDataSource
Instance Method Summary collapse
-
#initialize(word) ⇒ SingleWordDataSource
constructor
A new instance of SingleWordDataSource.
- #numberValues ⇒ Object
- #valueAt(offset) ⇒ Object
Methods inherited from BaseDataSource
#each_with_index, #extendWith, #has_terminator?, #nextDataSourceValueAt, #valueSequence
Constructor Details
#initialize(word) ⇒ SingleWordDataSource
Returns a new instance of SingleWordDataSource.
61 62 63 |
# File 'lib/data/word_data_source.rb', line 61 def initialize(word) @word = word end |
Instance Method Details
#numberValues ⇒ Object
65 66 67 |
# File 'lib/data/word_data_source.rb', line 65 def numberValues return 1 end |
#valueAt(offset) ⇒ Object
69 70 71 72 |
# File 'lib/data/word_data_source.rb', line 69 def valueAt(offset) return nil if (offset > 0) return @word end |