Method: LazyModule.new

Defined in:
lib/extlib/lazy_module.rb

.new(&blk) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/extlib/lazy_module.rb', line 2

def self.new(&blk)
  # passing no-op block overrides &blk
  m = super{ }
  class << m
    include ClassMethods
  end
  m.lazy_evaluated_body = blk
  m
end