Module: Babl::Operators::Using::DSL
- Included in:
- Template
- Defined in:
- lib/babl/operators/using.rb
Instance Method Summary collapse
Instance Method Details
#using(*mods, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/babl/operators/using.rb', line 6 def using(*mods, &block) extended_self = if mods.empty? self else ::Class.new(self.class) { mods.each { |mod| include mod } }.new(builder) end extended_self.source(&(block || -> { self })) end |