Module: Magicka::Helper::ClassMethods

Included in:
Magicka::Helper
Defined in:
lib/magicka/helper/class_methods.rb

Overview

Class methods for Magicka::Helper

Instance Method Summary collapse

Instance Method Details

#with(aggregator_class, type = aggregator_class.type) ⇒ Array<NilClass>

Adds a helper method magicka_type

The created method executes a block with a an aggragator

Parameters:

  • aggregator_class (Class<Magicka::Aggregator>)

    Agragator to be initialized

  • type (String, Symbol) (defaults to: aggregator_class.type)

    type of aggregator, this will define the method name

Returns:

  • (Array<NilClass>)


8
9
10
# File 'lib/magicka/helper/class_methods.rb', line 8

def with(aggregator_class, type = aggregator_class.type)
  MethodBuilder.new(self).build_aggregator(aggregator_class, type)
end