Class: Fog::Tasks::Wunderlist::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/wunderlist/tasks.rb,
lib/fog/wunderlist/requests/tasks/get_task.rb,
lib/fog/wunderlist/requests/tasks/list_lists.rb,
lib/fog/wunderlist/requests/tasks/list_tasks.rb,
lib/fog/wunderlist/requests/tasks/create_list.rb,
lib/fog/wunderlist/requests/tasks/create_task.rb,
lib/fog/wunderlist/requests/tasks/delete_list.rb,
lib/fog/wunderlist/requests/tasks/delete_task.rb,
lib/fog/wunderlist/requests/tasks/update_list.rb,
lib/fog/wunderlist/requests/tasks/update_task.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



44
45
46
# File 'lib/fog/wunderlist/tasks.rb', line 44

def initialize(options={})
  @password = options[:wunderlist_password]
end

Class Method Details

.dataObject



31
32
33
34
35
36
37
38
# File 'lib/fog/wunderlist/tasks.rb', line 31

def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {
      :tasks => [],
      :lists => []
    }
  end
end

.resetObject



40
41
42
# File 'lib/fog/wunderlist/tasks.rb', line 40

def self.reset
  @data = nil
end

Instance Method Details

#create_list(title, attributes = {}) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/fog/wunderlist/requests/tasks/create_list.rb', line 19

def create_list(title, attributes = {})
  Fog::Mock.not_implemented
  #response = Excon::Response.new
  #response.status = 200
  #response.body = {
  #}
  #response
end

#create_task(attributes) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/fog/wunderlist/requests/tasks/create_task.rb', line 22

def create_task(attributes)
  Fog::Mock.not_implemented
  #response = Excon::Response.new
  #response.status = 200
  #response.body = {
  #}
  #response
end

#dataObject



48
49
50
# File 'lib/fog/wunderlist/tasks.rb', line 48

def data
  self.class.data[@password]
end

#delete_list(id) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/fog/wunderlist/requests/tasks/delete_list.rb', line 18

def delete_list(id)
  Fog::Mock.not_implemented
  #response = Excon::Response.new
  #response.status = 200
  #response.body = {
  #}
  #response
end

#delete_task(id) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/fog/wunderlist/requests/tasks/delete_task.rb', line 18

def delete_task(id)
  Fog::Mock.not_implemented
  #response = Excon::Response.new
  #response.status = 200
  #response.body = {
  #}
  #response
end

#get_tasks(id) ⇒ Object



18
19
20
# File 'lib/fog/wunderlist/requests/tasks/get_task.rb', line 18

def get_tasks(id)
  Fog::Mock.not_implemented
end

#list_listsObject



18
19
20
# File 'lib/fog/wunderlist/requests/tasks/list_lists.rb', line 18

def list_lists
  Fog::Mock.not_implemented
end

#list_tasksObject



18
19
20
21
22
23
24
25
# File 'lib/fog/wunderlist/requests/tasks/list_tasks.rb', line 18

def list_tasks
  Fog::Mock.not_implementeD
  #response = Excon::Response.new
  #response.status = 200
  #response.body = {
  #}
  #response
end

#reset_dataObject



52
53
54
# File 'lib/fog/wunderlist/tasks.rb', line 52

def reset_data
  self.class.data.delete(@password)
end

#update_list(id, attributes = {}) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/fog/wunderlist/requests/tasks/update_list.rb', line 19

def update_list(id, attributes = {})
  Fog::Mock.not_implemented
  #response = Excon::Response.new
  #response.status = 200
  #response.body = {
  #}
  #response
end

#update_task(id, attributes = {}) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/fog/wunderlist/requests/tasks/update_task.rb', line 19

def update_task(id, attributes = {})
  Fog::Mock.not_implemented
  #response = Excon::Response.new
  #response.status = 200
  #response.body = {
  #}
  #response
end