File: handler.rb

package info (click to toggle)
ruby-rabl-rails 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 288 kB
  • sloc: ruby: 1,630; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 328 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'active_support/core_ext/class/attribute'

module RablRails
  module Handlers
    class Rabl
      def self.call(template, source = nil)
        %{
          RablRails::Library.instance.
            get_rendered_template(#{(source || template.source).inspect}, self, local_assigns)
        }
      end
    end
  end
end