Module: HabiticaClient::Tasks::Types

Included in:
HabiticaClient::Tasks
Defined in:
lib/habitica_client/tasks/types.rb

Instance Method Summary collapse

Instance Method Details

#by_type(type) ⇒ Object



17
18
19
# File 'lib/habitica_client/tasks/types.rb', line 17

def by_type(type)
  select { |task| task.type == type }
end

#dailiesObject



9
10
11
# File 'lib/habitica_client/tasks/types.rb', line 9

def dailies
  by_type('daily')
end

#habitsObject



5
6
7
# File 'lib/habitica_client/tasks/types.rb', line 5

def habits
  by_type('habit')
end

#todosObject



13
14
15
# File 'lib/habitica_client/tasks/types.rb', line 13

def todos
  by_type('todo')
end