Method: Legato::Model#segment

Defined in:
lib/legato/model.rb

#segment(name, &block) ⇒ Proc

Define a segment

Parameters:

  • name (Symbol)

    the class method name for the resulting segment

  • block

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

Returns:

  • (Proc)

    the body of newly defined method



50
51
52
# File 'lib/legato/model.rb', line 50

def segment(name, &block)
  add_method_to_set(name, :segment_filters, &block)
end