Sha256: 3b20c1cea09b0cea7dec938d1bb9384c849cd72de3db9e3e72ab45d16d3546b8

Contents?: true

Size: 489 Bytes

Versions: 6

Compression:

Stored size: 489 Bytes

Contents

require 'lokar'

module Ramaze
  module View
    ##
    # Allows views to use Lokar as the template engine. See the following
    # website for more information: https://github.com/Zoxc/Lokar
    #
    module Lokar
      def self.call(action, string)
        compiled = View.compile(string){|s| ::Lokar.compile(s, action.view || __FILE__) }
        html = action.instance.instance_eval(&compiled).join

        return html, 'text/html'
      end
    end # Helper
  end # View
end # Ramaze

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ramaze-2023.01.06 lib/ramaze/view/lokar.rb
ramaze-2012.12.08 lib/ramaze/view/lokar.rb
ramaze-2012.12.08b lib/ramaze/view/lokar.rb
ramaze-2011.12.28 lib/ramaze/view/lokar.rb
ramaze-2011.10.23 lib/ramaze/view/lokar.rb
ramaze-2011.07.25 lib/ramaze/view/lokar.rb