class Trello::AssociationBuilder::HasMany

Public Class Methods

build(model_klass, name, options) click to toggle source
# File lib/trello/association_builder/has_many.rb, line 5
def build(model_klass, name, options)
  model_klass.class_eval do
    define_method(name) do |*args|
      has_many_fetcher = AssociationFetcher::HasMany.new(self, name, options)
      filter_params = args[0] || {}
      has_many_fetcher.fetch(filter_params)
    end
  end
end