Module: NoBrainer::Document::InjectionLayer::ClassMethods

Defined in:
lib/no_brainer/document/injection_layer.rb

Instance Method Summary collapse

Instance Method Details

#inject_in_layer(name, &block) ⇒ Object



5
6
7
8
9
# File 'lib/no_brainer/document/injection_layer.rb', line 5

def inject_in_layer(name, &block)
  mod = class_eval "module NoBrainerLayer; module #{name.to_s.camelize}; self; end; end"
  mod.module_exec(&block)
  include mod
end