Class: Toadie::Todolist
- Inherits:
-
Object
- Object
- Toadie::Todolist
- Defined in:
- lib/toadie/todolist.rb
Instance Attribute Summary collapse
-
#todos ⇒ Object
Returns the value of attribute todos.
Instance Method Summary collapse
- #grouped ⇒ Object
-
#initialize(raw_todos) ⇒ Todolist
constructor
A new instance of Todolist.
- #size ⇒ Object
Constructor Details
Instance Attribute Details
#todos ⇒ Object
Returns the value of attribute todos.
3 4 5 |
# File 'lib/toadie/todolist.rb', line 3 def todos @todos end |
Instance Method Details
#grouped ⇒ Object
9 10 11 |
# File 'lib/toadie/todolist.rb', line 9 def grouped @grouped ||= Hash[todos.group_by(&:responsible).sort_by { |k, v| -v.size }] end |
#size ⇒ Object
13 14 15 |
# File 'lib/toadie/todolist.rb', line 13 def size todos.size end |