Method: Legato::Model#filter

Defined in:
lib/legato/model.rb

#filter(name, &block) ⇒ Proc

Define a filter

Parameters:

  • name (Symbol)

    the class method name for the resulting filter

  • block

    the block which contains filter methods to define the parameters used for filtering the request to GA

Returns:

  • (Proc)

    the body of newly defined method



35
36
37
# File 'lib/legato/model.rb', line 35

def filter(name, &block)
  add_method_to_set(name, :filters, &block)
end