This file is indexed.

/usr/lib/ruby/1.8/ramaze/view/nagoro.rb is in libramaze-ruby1.8 2010.06.18-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
require 'nagoro'
require 'ramaze/view/nagoro/render_partial'

module Ramaze
  module View
    # Binding to the Nagoro templating engine.
    #
    # To pipe your template through tidy you have to use:
    #
    #   Ramaze::View::Nagoro.options.tidy = true
    #
    # @see http://github.com/manveru/nagoro
    module Nagoro
      include Optioned

      options.dsl do
        o "Pipes to pass the template through",
          :pipes, ::Nagoro::DEFAULT_PIPES

        o "Use tidy to cleanup the rendered template",
          :tidy, false
      end

      def self.call(action, string)
        default_options = {
          :pipes     => options.pipes,
          :filename  => action.view,
          :binding   => action.binding,
          :variables => action.variables
        }

        render_options = default_options.merge(action.options)

        if options.tidy
          html = ::Nagoro.tidy_render(string.to_s, render_options)
        else
          html = ::Nagoro.render(string.to_s, render_options)
        end

        return html, 'text/html'
      end
    end
  end
end