Class: Oxidized::Hook
- Inherits:
-
Object
- Object
- Oxidized::Hook
- Defined in:
- lib/oxidized/hook.rb
Overview
Hook abstract base class
Direct Known Subclasses
AwsSns, CiscoSparkDiff, Exec, GithubRepo, NoopHook, SlackDiff, XMPPDiff
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.
72 73 |
# File 'lib/oxidized/hook.rb', line 72 def initialize end |
Instance Attribute Details
#cfg ⇒ Object
Returns the value of attribute cfg.
70 71 72 |
# File 'lib/oxidized/hook.rb', line 70 def cfg @cfg end |
Instance Method Details
#log(msg, level = :info) ⇒ Object
84 85 86 |
# File 'lib/oxidized/hook.rb', line 84 def log(msg, level = :info) Oxidized.logger.send(level, "#{self.class.name}: #{msg}") end |
#run_hook(ctx) ⇒ Object
80 81 82 |
# File 'lib/oxidized/hook.rb', line 80 def run_hook ctx raise NotImplementedError end |