Class: EpubForge::Actions::HooksInterface
- Inherits:
-
Object
- Object
- EpubForge::Actions::HooksInterface
- Defined in:
- lib/epubforge/action/hooks_interface.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#add_hook(hookset, block) ⇒ Object
Symbol: either :before or :after.
- #run_hooks(hookset) ⇒ Object
Class Method Details
.included(base) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/epubforge/action/hooks_interface.rb', line 14 def self.included( base ) if base == Action base.add_hook(:before) do @project = @options[:project] end end end |
Instance Method Details
#add_hook(hookset, block) ⇒ Object
Symbol: either :before or :after
5 6 7 |
# File 'lib/epubforge/action/hooks_interface.rb', line 5 def add_hook( hookset, block ) # Symbol: either :before or :after end |
#run_hooks(hookset) ⇒ Object
9 10 11 12 |
# File 'lib/epubforge/action/hooks_interface.rb', line 9 def run_hooks( hookset ) super( hookset ) unless self == Action end |