Class: Dude::ProjectManagement::Trello::FetchCurrentTasks

Inherits:
Object
  • Object
show all
Defined in:
lib/dude/project_management/trello/fetch_current_tasks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, fetch_lists: nil) ⇒ FetchCurrentTasks

Returns a new instance of FetchCurrentTasks.



11
12
13
14
15
# File 'lib/dude/project_management/trello/fetch_current_tasks.rb', line 11

def initialize(client, fetch_lists: nil)
  @client = client

  @fetch_lists = fetch_lists || FetchLists.new(client)
end

Instance Attribute Details

#fetch_listsObject (readonly)

Returns the value of attribute fetch_lists.



9
10
11
# File 'lib/dude/project_management/trello/fetch_current_tasks.rb', line 9

def fetch_lists
  @fetch_lists
end

Instance Method Details

#callObject



17
18
19
20
# File 'lib/dude/project_management/trello/fetch_current_tasks.rb', line 17

def call
  lists = fetch_lists.call
  lists.map { |list| retrieve_list_issues(list) }.flatten
end