Class: MorningPages::Stats
- Inherits:
-
Struct
- Object
- Struct
- MorningPages::Stats
- Defined in:
- lib/morning-pages/stats.rb
Instance Attribute Summary collapse
-
#words ⇒ Object
Returns the value of attribute words.
Instance Method Summary collapse
Instance Attribute Details
#words ⇒ Object
Returns the value of attribute words
2 3 4 |
# File 'lib/morning-pages/stats.rb', line 2 def words @words end |
Instance Method Details
#average_length ⇒ Object
7 8 9 |
# File 'lib/morning-pages/stats.rb', line 7 def average_length words.average_length end |
#count ⇒ Object
3 4 5 |
# File 'lib/morning-pages/stats.rb', line 3 def count words.count end |
#post!(config) ⇒ Object
11 12 13 |
# File 'lib/morning-pages/stats.rb', line 11 def post!(config) config.post_stats!(:count => count, :average_length => average_length) end |