Included Modules

Class Index [+]

Quicksearch

Ramaze::Helper::Ultraviolet

Public Instance Methods

ultraviolet(path, options = {}) click to toggle source

Parse and output the file at the given path. Please head over to the Ultraviolet documentation for more information on possible options.

    # File lib/ramaze/helper/ultraviolet.rb, line 19
19:       def ultraviolet(path, options = {})
20:         o = ancestral_trait[:ultraviolet].merge(options)
21:         output, syntax, lines, style, headers =
22:           o.values_at(:output, :syntax, :line_numbers, :style, :headers)
23: 
24:         syntax ||= Uv.syntax_for_file(path).first.first
25:         code = File.read(path)
26: 
27:         p [code, output, syntax, lines, style, headers]
28:         Uv.parse(code, output, syntax, lines, style, headers)
29:       end
ultraviolet_css(theme) click to toggle source

Return absolute path to the css of given name.

Usually this will point to somewhere in the gem tree.

It seems like Uv will add support for user-defined PATH in the future, so we will, to be future-proof, traverse the Uv.path even though it currently will only have one directory.

    # File lib/ramaze/helper/ultraviolet.rb, line 40
40:       def ultraviolet_css(theme)
41:         Uv.path.each do |path|
42:           Dir[path/"render/xhtml/files/css/*.css"].each do |css|
43:             return css if File.basename(css, '.css') == theme
44:           end
45:         end
46:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.