Sha256: b1632d22023c4c309d67ee4a8de4afd38be0c6930e502f8fc7d2bb860f54b7ab

Contents?: true

Size: 443 Bytes

Versions: 17

Compression:

Stored size: 443 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'webgen/content_processor'
require 'erb'

module Webgen
  class ContentProcessor

    # Processes the content that is valid Ruby to generate new content.
    module Ruby

      extend ERB::Util

      # Process the content of +context+ which needs to be valid Ruby code.
      def self.call(context)
        eval(context.content, binding, context.ref_node.alcn)
        context
      end

    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
webgen-1.7.3 lib/webgen/content_processor/ruby.rb
webgen-1.7.2 lib/webgen/content_processor/ruby.rb
webgen-1.7.1 lib/webgen/content_processor/ruby.rb
webgen-1.7.0 lib/webgen/content_processor/ruby.rb
webgen-1.6.0 lib/webgen/content_processor/ruby.rb
webgen-1.5.2 lib/webgen/content_processor/ruby.rb
webgen-1.5.1 lib/webgen/content_processor/ruby.rb
webgen-1.5.0 lib/webgen/content_processor/ruby.rb
webgen-1.4.1 lib/webgen/content_processor/ruby.rb
webgen-1.4.0 lib/webgen/content_processor/ruby.rb
webgen-1.3.0 lib/webgen/content_processor/ruby.rb
webgen-1.2.1 lib/webgen/content_processor/ruby.rb
webgen-1.2.0 lib/webgen/content_processor/ruby.rb
webgen-1.1.0 lib/webgen/content_processor/ruby.rb
webgen-1.0.0 lib/webgen/content_processor/ruby.rb
webgen-1.0.0.beta3 lib/webgen/content_processor/ruby.rb
webgen-1.0.0.beta2 lib/webgen/content_processor/ruby.rb