Sha256: 59d2b42a6de68134a2035f9eb96fdce4f3a47f173cb68e8e423c66ff4012551e

Contents?: true

Size: 694 Bytes

Versions: 1

Compression:

Stored size: 694 Bytes

Contents

#          Copyright (c) 2006 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the Ruby license.

require 'remarkably/engines/html'

module Ramaze
  module Template
    class Remarkably < Template
      Controller.register_engine self, %w[ rem ]

      class << self
        def transform action
          result, file = result_and_file(action)

          result = transform_file(file, action) if file
          result.to_s
        end

        def transform_file(file, action)
          action.controller.instance_eval do
            args = action.params
            instance_eval(file)
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ramaze-0.1.1 lib/ramaze/template/remarkably.rb