Class: TextRazor::Sentence

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Sentence

Returns a new instance of Sentence.



5
6
7
8
# File 'lib/text_razor/sentence.rb', line 5

def initialize(options={})
  @position = options['position']
  @words = options['words'].collect {|word| Word.new(word)}
end

Instance Attribute Details

#positionObject (readonly)

Returns the value of attribute position.



3
4
5
# File 'lib/text_razor/sentence.rb', line 3

def position
  @position
end

#wordsObject (readonly)

Returns the value of attribute words.



3
4
5
# File 'lib/text_razor/sentence.rb', line 3

def words
  @words
end