Class: Rucola::Plugin

Inherits:
Object show all
Defined in:
lib/rucola/plugin.rb

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

Instance Method Summary collapse

Class Method Details

.after_bootObject



21
22
23
# File 'lib/rucola/plugin.rb', line 21

def self.after_boot
  plugins.each { |p| p.after_boot }
end

.after_launchObject



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_bootObject



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

.pluginsObject



9
10
11
# File 'lib/rucola/plugin.rb', line 9

def self.plugins
  @@plugins
end

Instance Method Details

#after_bootObject



38
# File 'lib/rucola/plugin.rb', line 38

def after_boot; end

#after_launchObject



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_bootObject



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