class Trello::AssociationFetcher::HasOne::Fetch
Attributes
params[R]
Public Class Methods
execute(params)
click to toggle source
# File lib/trello/association_fetcher/has_one/fetch.rb, line 6 def execute(params) new(params).execute end
new(params)
click to toggle source
# File lib/trello/association_fetcher/has_one/fetch.rb, line 11 def initialize(params) @params = params end
Public Instance Methods
execute()
click to toggle source
# File lib/trello/association_fetcher/has_one/fetch.rb, line 15 def execute if association_restful_name client.find(association_restful_name, association_restful_id) else association_class.find(association_restful_id) end end
Private Instance Methods
association_class()
click to toggle source
# File lib/trello/association_fetcher/has_one/fetch.rb, line 43 def association_class params.association_class end
association_owner()
click to toggle source
# File lib/trello/association_fetcher/has_one/fetch.rb, line 31 def association_owner params.association_owner end
association_restful_id()
click to toggle source
# File lib/trello/association_fetcher/has_one/fetch.rb, line 39 def association_restful_id params.association_restful_id end
association_restful_name()
click to toggle source
# File lib/trello/association_fetcher/has_one/fetch.rb, line 35 def association_restful_name params.association_restful_name end
client()
click to toggle source
# File lib/trello/association_fetcher/has_one/fetch.rb, line 27 def client association_owner.client end