Module: Voom::Presenters::DSL::Components::Mixins::Helpers

Included in:
UserInterface
Defined in:
lib/voom/presenters/dsl/components/mixins/helpers.rb

Instance Method Summary collapse

Instance Method Details

#helpers(module_ = nil, &block) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/voom/presenters/dsl/components/mixins/helpers.rb', line 7

def helpers(module_=nil, &block)
  return unless module_ || block
  @helpers ||= Module.new
  @helpers.include module_ if module_
  @helpers.module_eval(&block) if block
  extend(@helpers)
end