Module: Kernel
- Defined in:
- lib/hobo_support/module.rb,
lib/hobo_support.rb,
lib/hobo_support/methodphitamine.rb
Overview
classy_module lets you extract code from classes into modules, but still write it the same way
Instance Method Summary collapse
Instance Method Details
#classy_module(mod = Module.new, &b) ⇒ Object
87 88 89 90 91 92 |
# File 'lib/hobo_support/module.rb', line 87 def classy_module(mod=Module.new, &b) mod. :included do |base| base.class_eval &b end mod end |