Module: JustInclude
- Defined in:
- lib/just_include/version.rb,
lib/just_include/just_include.rb
Constant Summary collapse
- VERSION =
'2.0.0'
Class Method Summary collapse
Class Method Details
.included(including_module) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/just_include/just_include.rb', line 8 def self.included(including_module) class << including_module; attr_accessor :just_include_block; end def including_module.included(including_class) including_class.class_eval(&(self.just_include_block)) end def including_module.this_code(&block) self.just_include_block = block end end |