Module: MiniSql::Decoratable
- Defined in:
- lib/mini_sql/decoratable.rb
Instance Method Summary collapse
Instance Method Details
#decorated(mod) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/mini_sql/decoratable.rb', line 5 def decorated(mod) @decoratorated_classes ||= {} @decoratorated_classes[mod] ||= Class.new(self) do include(mod) instance_eval <<~RUBY def decorator #{mod} end RUBY end end |
#decorator ⇒ Object
18 19 20 |
# File 'lib/mini_sql/decoratable.rb', line 18 def decorator nil end |