Class: Trello::AssociationFetcher::HasMany::Fetch

Inherits:
Object
  • Object
show all
Defined in:
lib/trello/association_fetcher/has_many/fetch.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Fetch

Returns a new instance of Fetch.



13
14
15
# File 'lib/trello/association_fetcher/has_many/fetch.rb', line 13

def initialize(params)
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



11
12
13
# File 'lib/trello/association_fetcher/has_many/fetch.rb', line 11

def params
  @params
end

Class Method Details

.execute(params) ⇒ Object



6
7
8
# File 'lib/trello/association_fetcher/has_many/fetch.rb', line 6

def execute(params)
  new(params).execute
end

Instance Method Details

#executeObject



17
18
19
20
21
# File 'lib/trello/association_fetcher/has_many/fetch.rb', line 17

def execute
  resources = client.find_many(association_class, path, filter_params)

  MultiAssociation.new(association_owner, resources).proxy
end