Class: OmniCat::Doc
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#tokens ⇒ Object
readonly
Returns the value of attribute tokens.
Instance Method Summary collapse
- #decrement_count ⇒ Object
- #increment_count ⇒ Object
-
#initialize(doc_hash = {}) ⇒ Doc
constructor
A new instance of Doc.
Methods inherited from Base
Constructor Details
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
6 7 8 |
# File 'lib/omnicat/doc.rb', line 6 def content @content end |
#count ⇒ Object (readonly)
Returns the value of attribute count.
6 7 8 |
# File 'lib/omnicat/doc.rb', line 6 def count @count end |
#tokens ⇒ Object (readonly)
Returns the value of attribute tokens.
6 7 8 |
# File 'lib/omnicat/doc.rb', line 6 def tokens @tokens end |
Instance Method Details
#decrement_count ⇒ Object
18 19 20 |
# File 'lib/omnicat/doc.rb', line 18 def decrement_count @count -= 1 if @count > 0 end |
#increment_count ⇒ Object
14 15 16 |
# File 'lib/omnicat/doc.rb', line 14 def increment_count @count += 1 end |