Module: ZendeskAPI::Associations::ClassMethods
- Defined in:
- lib/zendesk_api/associations.rb
Defined Under Namespace
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#associated_with(name) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/zendesk_api/associations.rb', line 42 def associated_with(name) associations.inject([]) do |associated_with, association| if association[:include] == name.to_s associated_with.push(Association.new(association)) end associated_with end end |
#associations ⇒ Object
38 39 40 |
# File 'lib/zendesk_api/associations.rb', line 38 def associations @associations ||= [] end |