Sha256: b9219d6551ad28967514fd46ddf56e483774e07a1b20923d4dda36d19a59114d

Contents?: true

Size: 613 Bytes

Versions: 9

Compression:

Stored size: 613 Bytes

Contents

module Webgen::ContentProcessor

  # Processes embedded Ruby statements.
  class Erb

    # Process the Ruby statements embedded in the content of +context+.
    def call(context)
      require 'erb'

      node = context.content_node
      ref_node = context.ref_node
      dest_node = context.dest_node

      erb = ERB.new(context.content)
      erb.filename = context.ref_node.absolute_lcn
      context.content = erb.result(binding)
      context
    rescue Exception => e
      raise RuntimeError, "Erb processing failed in <#{context.ref_node.absolute_lcn}>: #{e.message}", e.backtrace
    end

  end

end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
gettalong-webgen-0.5.4.20080929 lib/webgen/contentprocessor/erb.rb
gettalong-webgen-0.5.5.20081001 lib/webgen/contentprocessor/erb.rb
gettalong-webgen-0.5.5.20081010 lib/webgen/contentprocessor/erb.rb
gettalong-webgen-0.5.5.20081012 lib/webgen/contentprocessor/erb.rb
gettalong-webgen-0.5.6.20081020 lib/webgen/contentprocessor/erb.rb
webgen-0.5.4 lib/webgen/contentprocessor/erb.rb
webgen-0.5.3 lib/webgen/contentprocessor/erb.rb
webgen-0.5.6 lib/webgen/contentprocessor/erb.rb
webgen-0.5.5 lib/webgen/contentprocessor/erb.rb