Class: Oxidized::Hook

Inherits:
Object
  • Object
show all
Defined in:
lib/oxidized/hook.rb

Overview

Hook abstract base class

Direct Known Subclasses

Exec, NoopHook

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHook

Returns a new instance of Hook.



71
72
# File 'lib/oxidized/hook.rb', line 71

def initialize
end

Instance Attribute Details

#cfgObject

Returns the value of attribute cfg.



69
70
71
# File 'lib/oxidized/hook.rb', line 69

def cfg
  @cfg
end

Instance Method Details

#log(msg, level = :info) ⇒ Object



83
84
85
# File 'lib/oxidized/hook.rb', line 83

def log(msg, level=:info)
  Log.send(level, "#{self.class.name}: #{msg}")
end

#run_hook(ctx) ⇒ Object

Raises:

  • (NotImplementedError)


79
80
81
# File 'lib/oxidized/hook.rb', line 79

def run_hook ctx
  raise NotImplementedError
end