class JiraMule::IssueRender

Public Class Methods

new(hsh) click to toggle source
# File lib/JiraMule/renderMagic.rb, line 5
def initialize(hsh)
  hsh.each_pair do |k,v|
    self.class.send(:define_method, k.to_sym) {v}
  end
  @issue = hsh
  self.class.send(:define_method, :issue) {@issue}
end
render(tmpl, issue, custom_tags={}) click to toggle source
# File lib/JiraMule/renderMagic.rb, line 18
def self.render(tmpl, issue, custom_tags={})
  r = self.new(issue.dup)
  custom_tags.each_pair do |name, blk|
    r[name.to_sym] = lambda do
      blk.call(issue.dup)
    end
  end
  r.render(tmpl)
end

Public Instance Methods

escapeHTML(str) click to toggle source

We're not doing HTML, so never escape.

# File lib/JiraMule/renderMagic.rb, line 14
def escapeHTML(str)
  str
end