Module: Memery::ModuleMethods

Included in:
Memery
Defined in:
lib/memery.rb

Instance Method Summary collapse

Instance Method Details

#included(base = nil, &block) ⇒ Object



23
24
25
26
27
28
29
30
31
32
# File 'lib/memery.rb', line 23

def included(base = nil, &block)
  if base.nil? && block
    super do
      instance_exec(&block)
      instance_exec(&OUR_BLOCK)
    end
  else
    base.instance_exec(&OUR_BLOCK)
  end
end