Class: Rucola::Plugin
Overview
Abstract base class for Rucola plugins override the methods in your plugin to get code run at appropriate times
Constant Summary collapse
- @@plugins =
[]
Class Method Summary collapse
- .after_boot ⇒ Object
- .after_launch ⇒ Object
- .after_process(initializer) ⇒ Object
- .before_boot ⇒ Object
- .before_process(initializer) ⇒ Object
- .inherited(subclass) ⇒ Object
- .plugins ⇒ Object
Instance Method Summary collapse
- #after_boot ⇒ Object
- #after_launch ⇒ Object
- #after_process(initializer) ⇒ Object
- #before_boot ⇒ Object
- #before_process(initializer) ⇒ Object
Class Method Details
.after_boot ⇒ Object
21 22 23 |
# File 'lib/rucola/plugin.rb', line 21 def self.after_boot plugins.each { |p| p.after_boot } end |
.after_launch ⇒ Object
33 34 35 |
# File 'lib/rucola/plugin.rb', line 33 def self.after_launch plugins.each {|p| p.after_launch } end |
.after_process(initializer) ⇒ Object
29 30 31 |
# File 'lib/rucola/plugin.rb', line 29 def self.after_process(initializer) plugins.each {|p| p.after_process(initializer) } end |
.before_boot ⇒ Object
17 18 19 |
# File 'lib/rucola/plugin.rb', line 17 def self.before_boot plugins.each { |p| p.before_boot } end |
.before_process(initializer) ⇒ Object
25 26 27 |
# File 'lib/rucola/plugin.rb', line 25 def self.before_process(initializer) plugins.each {|p| p.before_process(initializer) } end |
.inherited(subclass) ⇒ Object
13 14 15 |
# File 'lib/rucola/plugin.rb', line 13 def self.inherited(subclass) @@plugins << subclass.new end |
.plugins ⇒ Object
9 10 11 |
# File 'lib/rucola/plugin.rb', line 9 def self.plugins @@plugins end |
Instance Method Details
#after_boot ⇒ Object
38 |
# File 'lib/rucola/plugin.rb', line 38 def after_boot; end |
#after_launch ⇒ Object
41 |
# File 'lib/rucola/plugin.rb', line 41 def after_launch; end |
#after_process(initializer) ⇒ Object
40 |
# File 'lib/rucola/plugin.rb', line 40 def after_process(initializer); end |
#before_boot ⇒ Object
37 |
# File 'lib/rucola/plugin.rb', line 37 def before_boot; end |
#before_process(initializer) ⇒ Object
39 |
# File 'lib/rucola/plugin.rb', line 39 def before_process(initializer); end |