Class: Oxidized::Hook
- Inherits:
-
Object
- Object
- Oxidized::Hook
- Defined in:
- lib/oxidized/hook.rb
Overview
Hook abstract base class
Instance Attribute Summary collapse
-
#cfg ⇒ Object
Returns the value of attribute cfg.
Instance Method Summary collapse
-
#initialize ⇒ Hook
constructor
A new instance of Hook.
- #log(msg, level = :info) ⇒ Object
- #run_hook(ctx) ⇒ Object
Constructor Details
#initialize ⇒ Hook
Returns a new instance of Hook.
71 72 |
# File 'lib/oxidized/hook.rb', line 71 def initialize end |
Instance Attribute Details
#cfg ⇒ Object
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
79 80 81 |
# File 'lib/oxidized/hook.rb', line 79 def run_hook ctx raise NotImplementedError end |