Module: Erector::Mixin

Defined in:
lib/erector/mixin.rb

Instance Method Summary collapse

Instance Method Details

#erector(options = {}, &block) ⇒ Object

Executes the block as if it were the content body of a fresh Erector::Inline, and returns the #to_s value. Since it executes inside the new widget it does not have access to instance variables of the caller, although it does have access to bound variables.



7
8
9
# File 'lib/erector/mixin.rb', line 7

def erector(options = {}, &block)
  Erector.inline(&block).to_s(options)
end