Sha256: 43a154b07d4f450b6f2dd55570ceb7bedabdec6499a1c6906cdeb66dbee4afe1

Contents?: true

Size: 707 Bytes

Versions: 18

Compression:

Stored size: 707 Bytes

Contents

require 'redcloth'

module Ramaze
  module Template

    # Is responsible for compiling a template using the RedCloth templating engine.
    # Can be found at: http://whytheluckystiff.net/ruby/redcloth/

    class RedCloth < Erubis
      ENGINES[self] = %w[ redcloth ]

      class << self
        # Take the action and directly transform it into html by RedCloth
        def transform(action)
          restrictions = action.controller.trait[:redcloth_options] || []
          rules = action.controller.trait[:redcloth_options] || []

          # Erubis -> RedCloth -> HTML
          redcloth = ::RedCloth.new(super, restrictions)
          redcloth.to_html(*rules)
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 5 rubygems

Version Path
Pistos-ramaze-2008.09 lib/ramaze/template/redcloth.rb
Pistos-ramaze-2008.12 lib/ramaze/template/redcloth.rb
Pistos-ramaze-2009.01 lib/ramaze/template/redcloth.rb
Pistos-ramaze-2009.02 lib/ramaze/template/redcloth.rb
clivecrous-ramaze-0.3.9.5 lib/ramaze/template/redcloth.rb
manveru-ramaze-2008.07 lib/ramaze/template/redcloth.rb
manveru-ramaze-2008.08 lib/ramaze/template/redcloth.rb
manveru-ramaze-2008.09 lib/ramaze/template/redcloth.rb
manveru-ramaze-2008.10 lib/ramaze/template/redcloth.rb
manveru-ramaze-2008.12 lib/ramaze/template/redcloth.rb
manveru-ramaze-2009.01 lib/ramaze/template/redcloth.rb
ptomato-ramaze-2009.02.1 lib/ramaze/template/redcloth.rb
ptomato-ramaze-2009.02 lib/ramaze/template/redcloth.rb
ramaze-2008.11 lib/ramaze/template/redcloth.rb
ramaze-2008.06 lib/ramaze/template/redcloth.rb
ramaze-2009.01 lib/ramaze/template/redcloth.rb
ramaze-2009.03 lib/ramaze/template/redcloth.rb
ramaze-2009.02 lib/ramaze/template/redcloth.rb