Class: Wunderlist::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/wunderlist/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, date = nil, list = nil, api = nil) ⇒ Task

Returns a new instance of Task.



29
30
31
32
33
34
# File 'lib/wunderlist/task.rb', line 29

def initialize(name = nil, date = nil, list = nil, api = nil)
  @name = name
  @date = date
  @api = api
  @list = list
end

Instance Attribute Details

#apiObject

Returns the value of attribute api.



27
28
29
# File 'lib/wunderlist/task.rb', line 27

def api
  @api
end

#dateObject

Returns the value of attribute date.



27
28
29
# File 'lib/wunderlist/task.rb', line 27

def date
  @date
end

#doneObject

Returns the value of attribute done.



27
28
29
# File 'lib/wunderlist/task.rb', line 27

def done
  @done
end

#idObject

Returns the value of attribute id.



27
28
29
# File 'lib/wunderlist/task.rb', line 27

def id
  @id
end

#importantObject

Returns the value of attribute important.



27
28
29
# File 'lib/wunderlist/task.rb', line 27

def important
  @important
end

#listObject

Returns the value of attribute list.



27
28
29
# File 'lib/wunderlist/task.rb', line 27

def list
  @list
end

#nameObject

Returns the value of attribute name.



27
28
29
# File 'lib/wunderlist/task.rb', line 27

def name
  @name
end

Instance Method Details

#save(api = nil) ⇒ Object



36
37
38
39
# File 'lib/wunderlist/task.rb', line 36

def save(api = nil)
  @api ||= api
  @api.save self
end