Class: Trello::AssociationFetcher::HasMany::Params
- Inherits:
-
Object
- Object
- Trello::AssociationFetcher::HasMany::Params
- Defined in:
- lib/trello/association_fetcher/has_many/params.rb
Instance Attribute Summary collapse
-
#association_owner ⇒ Object
readonly
Returns the value of attribute association_owner.
Instance Method Summary collapse
- #association_class ⇒ Object
- #fetch_path ⇒ Object
- #filter_params ⇒ Object
-
#initialize(association_owner:, association_name:, association_options:, filter:) ⇒ Params
constructor
A new instance of Params.
Constructor Details
#initialize(association_owner:, association_name:, association_options:, filter:) ⇒ Params
Returns a new instance of Params.
7 8 9 10 11 12 |
# File 'lib/trello/association_fetcher/has_many/params.rb', line 7 def initialize(association_owner:, association_name:, association_options:, filter:) @association_owner = association_owner @association_name = association_name @association_options = || {} @filter = filter || {} end |
Instance Attribute Details
#association_owner ⇒ Object (readonly)
Returns the value of attribute association_owner.
5 6 7 |
# File 'lib/trello/association_fetcher/has_many/params.rb', line 5 def association_owner @association_owner end |
Instance Method Details
#association_class ⇒ Object
14 15 16 |
# File 'lib/trello/association_fetcher/has_many/params.rb', line 14 def association_class [:via] || infer_class_on(association_name) end |
#fetch_path ⇒ Object
18 19 20 |
# File 'lib/trello/association_fetcher/has_many/params.rb', line 18 def fetch_path "/#{parent_restful_resource}/#{parent_restful_resource_id}/#{target_restful_resource}" end |
#filter_params ⇒ Object
22 23 24 |
# File 'lib/trello/association_fetcher/has_many/params.rb', line 22 def filter_params default_filter.merge(filter) end |