Class: TextRazor::Sentence
- Inherits:
-
Object
- Object
- TextRazor::Sentence
- Defined in:
- lib/textrazor/sentence.rb
Instance Attribute Summary collapse
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#words ⇒ Object
readonly
Returns the value of attribute words.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params) ⇒ Sentence
constructor
A new instance of Sentence.
- #number_of_words ⇒ Object
Constructor Details
Instance Attribute Details
#position ⇒ Object (readonly)
Returns the value of attribute position.
5 6 7 |
# File 'lib/textrazor/sentence.rb', line 5 def position @position end |
#words ⇒ Object (readonly)
Returns the value of attribute words.
5 6 7 |
# File 'lib/textrazor/sentence.rb', line 5 def words @words end |
Class Method Details
.create_from_hash(params) ⇒ Object
18 19 20 |
# File 'lib/textrazor/sentence.rb', line 18 def self.create_from_hash(params) new(params) end |
Instance Method Details
#number_of_words ⇒ Object
14 15 16 |
# File 'lib/textrazor/sentence.rb', line 14 def number_of_words @words.size end |