class HabiticaClient::Tasks
An enumerable object of all the user's tasks.
Also contains the endpoint for creating new tasks.
Public Instance Methods
create(attributes = {})
click to toggle source
Create a new task (and save it to habitrpg.com)
@param attributes [Hash] a hash of attributes for the new task.
# File lib/habitica_client/tasks.rb, line 28 def create(attributes = {}) Task.new(client, attributes).save end
each() { |parse| ... }
click to toggle source
Iterate over user tasks
# File lib/habitica_client/tasks.rb, line 19 def each data.each do |task| yield Task.parse(client, task) end end