Class: RTM::Chunk

Inherits:
Object
  • Object
show all
Defined in:
lib/rtmilk/api/tasks.rb

Overview

correspond to each Task.

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Chunk

Returns a new instance of Chunk.



184
185
186
# File 'lib/rtmilk/api/tasks.rb', line 184

def initialize(hash)
   @hash = hash
end

Instance Method Details

#addedObject



175
# File 'lib/rtmilk/api/tasks.rb', line 175

def added; @hash['added']; end

#completedObject



174
# File 'lib/rtmilk/api/tasks.rb', line 174

def completed; @hash['completed']; end

#delete(series, list) ⇒ Object



188
189
190
191
192
# File 'lib/rtmilk/api/tasks.rb', line 188

def delete(series, list)
   token    = RTM::API.token
   timeline = RTM::Timeline.new(RTM::API.token).to_s
   RTM::Tasks::Delete.new(token, timeline, list, series, id).invoke # TODO
end

#deletedObject



179
# File 'lib/rtmilk/api/tasks.rb', line 179

def deleted; @hash['deleted']; end

#dueObject



182
# File 'lib/rtmilk/api/tasks.rb', line 182

def due; @hash['due']; end

#estimateObject



181
# File 'lib/rtmilk/api/tasks.rb', line 181

def estimate; @hash['estimate']; end

#has_due_timeObject



180
# File 'lib/rtmilk/api/tasks.rb', line 180

def has_due_time; @hash['has_due_time'] == '1' ; end

#idObject



178
# File 'lib/rtmilk/api/tasks.rb', line 178

def id; @hash['id']; end

#postponedObject

TODO



176
# File 'lib/rtmilk/api/tasks.rb', line 176

def postponed; @hash['postponed']; end

#priorityObject



177
# File 'lib/rtmilk/api/tasks.rb', line 177

def priority; @hash['priority']; end