class Bugzilla::Plugin::Template
Bugzilla::Plugin::Template¶ ↑
Attributes
hostname[R]
Public Class Methods
inherited(subclass)
click to toggle source
# File lib/bugzilla/plugin.rb, line 46 def Template.inherited(subclass) @@plugins << subclass end
new()
click to toggle source
# File lib/bugzilla/plugin.rb, line 40 def initialize @hostname = nil end
Public Instance Methods
parserhook(parser, argv, opts)
click to toggle source
# File lib/bugzilla/plugin.rb, line 67 def parserhook(parser, argv, opts) end
posthook(cmd, opts)
click to toggle source
# File lib/bugzilla/plugin.rb, line 73 def posthook(cmd, opts) end
prehook(cmd, opts)
click to toggle source
# File lib/bugzilla/plugin.rb, line 70 def prehook(cmd, opts) end
run(hook, host, *args)
click to toggle source
# File lib/bugzilla/plugin.rb, line 50 def run(hook, host, *args) @@plugins.each do |k| i = k.new if i.hostname == host || host.nil? then case hook when :parser i.parserhook(*args) when :pre i.prehook(*args) when :post i.posthook(*args) else end end end end