Sha256: c10c5703c3bf2e67d080e675df82e1e6b5705cfb3c9fa33d172fa1aaed18adb7

Contents?: true

Size: 531 Bytes

Versions: 2

Compression:

Stored size: 531 Bytes

Contents

Ramaze.setup(:verbose => false) do
  gem 'Remarkably', :lib => 'remarkably'
end

require 'remarkably/engines/html'

module Ramaze
  module View
    module Remarkably
      def self.call(action, string)
        string = transform_string(action, string) if action.view
        html = string.to_s

        return html, 'text/html'
      end

      def self.transform_string(action, string)
        action.instance.instance_eval do
          args = action.params
          instance_eval(string)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ramaze-2012.04.14 lib/ramaze/view/remarkably.rb
ramaze-2012.03.07 lib/ramaze/view/remarkably.rb