Class: TextRazor::Sentence
- Inherits:
-
Object
- Object
- TextRazor::Sentence
- Defined in:
- lib/text_razor/sentence.rb
Instance Attribute Summary collapse
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#words ⇒ Object
readonly
Returns the value of attribute words.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Sentence
constructor
A new instance of Sentence.
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(={}) @position = ['position'] @words = ['words'].collect {|word| Word.new(word)} end |
Instance Attribute Details
#position ⇒ Object (readonly)
Returns the value of attribute position.
3 4 5 |
# File 'lib/text_razor/sentence.rb', line 3 def position @position end |
#words ⇒ Object (readonly)
Returns the value of attribute words.
3 4 5 |
# File 'lib/text_razor/sentence.rb', line 3 def words @words end |