Class: SingleWordDataSource

Inherits:
BaseDataSource show all
Defined in:
lib/data/word_data_source.rb

Instance Attribute Summary

Attributes inherited from BaseDataSource

#startOffset

Instance Method Summary collapse

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

#numberValuesObject



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