Module: Virtus::Support::Chainable
- Defined in:
- lib/virtus/support/chainable.rb
Constant Summary collapse
- MODULES =
{}
Instance Method Summary collapse
Instance Method Details
#chainable(key, &block) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/virtus/support/chainable.rb', line 6 def chainable(key, &block) begin mod = (MODULES[key] ||= Module.new) include mod mod end.module_eval(&block) end |