Class: Magicka::Helper::MethodBuilder Private

Inherits:
Sinclair
  • Object
show all
Defined in:
lib/magicka/helper/method_builder.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Builds methods for Magicka::Helper

Instance Method Summary collapse

Instance Method Details

#build_aggregatorArray<MethodDefinition>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Build aggregator helper method

Returns:

  • (Array<MethodDefinition>)


12
13
14
15
16
17
18
# File 'lib/magicka/helper/method_builder.rb', line 12

def build_aggregator
  opts = options

  add_method("magicka_#{opts.type}") do |model, &block|
    block.call(opts.configured_aggregator.new(self, model))
  end
end