This file is indexed.

/usr/lib/ruby/1.8/ramaze/view/tagz.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
require 'tagz'

module Ramaze
  module View
    module Tagz
      def self.call(action, string)
        return string, 'text/html' unless action.view

        markup = "tagz{#{string}}"
        action.instance.extend(Ramaze::View::Tagz::Methods)
        binding = action.binding

        html = eval(markup, binding, action.view)

        return html, 'text/html'
      end

      # A host of methods useful inside the context of a view including print
      # style methods that output content rather that printing to $stdout.
      module Methods
        include ::Tagz

        private

        def <<(s)
          tagz << s; self
        end

        def concat(*a)
          a.each{|s| tagz << s}; self
        end

        def puts(*a)
          a.each{|elem| tagz << "#{ elem.to_s.chomp }#{ eol }"}
        end

        def print(*a)
          a.each{|elem| tagz << elem}
        end

        def p(*a)
          a.each{|elem| tagz << "#{ Rack::Utils.escape_html elem.inspect }#{ eol }"}
        end

        def pp(*a)
          a.each{|elem| tagz << "#{ Rack::Utils.escape_html PP.pp(elem, '') }#{ eol }"}
        end

        def eol
          if response.content_type =~ %r|text/plain|io
            "\n"
          else
            "<br />"
          end
        end

        def __(*a)
          concat eol
        end
      end
    end
  end
end