Method: #modules
- Defined in:
- lib/sugar-high/module.rb
#modules(*module_names, &block) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/sugar-high/module.rb', line 10 def modules *module_names, &block module_names.flatten.each do |name| class_eval %{ module #{name.to_s.camelize} #{yield block if block} end } end end |