Parent

Methods

Files

Class Index [+]

Quicksearch

CodeRay::Encoders::HTML::Output::Template

Public Class Methods

wrap!(str, template, target) click to toggle source
     # File lib/coderay/encoders/html/output.rb, line 131
131:         def self.wrap! str, template, target
132:           target = Regexp.new(Regexp.escape("<%#{target}%>"))
133:           if template =~ target
134:             str[0,0] = $`
135:             str << $'
136:           else
137:             raise "Template target <%%%p%%> not found" % target
138:           end
139:         end

Public Instance Methods

apply(target, replacement) click to toggle source
     # File lib/coderay/encoders/html/output.rb, line 141
141:         def apply target, replacement
142:           target = Regexp.new(Regexp.escape("<%#{target}%>"))
143:           if self =~ target
144:             Template.new($` + replacement + $')
145:           else
146:             raise "Template target <%%%p%%> not found" % target
147:           end
148:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.