Class: LazyModule
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Methods inherited from Module
Class Method Details
.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 |