Sha256: a94860982b226f7bb5efca5e955685449e72fdef9119b5d281e3c0541ed74aa7

Contents?: true

Size: 556 Bytes

Versions: 20

Compression:

Stored size: 556 Bytes

Contents

module Erector
  module Mixin
    # Executes the block as if it were the content body of a fresh Erector::Inline,
    # and returns the #to_html 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. Funnily enough, the options are passed in to both
    # to_html *and* to the widget itself, so they show up as instance variables.
    def erector(options = {}, &block)
      Erector.inline(options, &block).to_html(options)
    end
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
erector-rails4-0.2.0 lib/erector/mixin.rb
erector-rails4-0.1.3 lib/erector/mixin.rb
erector-rails4-0.1.2 lib/erector/mixin.rb
erector-0.10.0 lib/erector/mixin.rb
erector-rails4-0.1.1 lib/erector/mixin.rb
erector-rails4-0.1.0 lib/erector/mixin.rb
erector-rails4-0.0.7 lib/erector/mixin.rb
erector-rails4-0.0.6 lib/erector/mixin.rb
erector-rails4-0.0.5 lib/erector/mixin.rb
erector-rails4-0.0.4 lib/erector/mixin.rb
erector-rails4-0.0.3 lib/erector/mixin.rb
erector-rails4-0.0.2 lib/erector/mixin.rb
erector-rails4-0.0.1 lib/erector/mixin.rb
erector-0.9.0 lib/erector/mixin.rb
erector-0.9.0.pre1 lib/erector/mixin.rb
erector-0.8.3 lib/erector/mixin.rb
erector-0.8.2 lib/erector/mixin.rb
honkster-erector-0.8.1 lib/erector/mixin.rb
erector-0.8.1 lib/erector/mixin.rb
erector-0.8.0 lib/erector/mixin.rb