Class: Praxis::Plugin
- Inherits:
-
Object
- Object
- Praxis::Plugin
- Defined in:
- lib/praxis/plugin.rb
Overview
one instance is created per use.
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Instance Method Summary collapse
- #after(stage, &block) ⇒ Object
- #before(stage, &block) ⇒ Object
- #config ⇒ Object
-
#initialize(application, &block) ⇒ Plugin
constructor
A new instance of Plugin.
- #setup! ⇒ Object
Constructor Details
#initialize(application, &block) ⇒ Plugin
Returns a new instance of Plugin.
8 9 10 11 |
# File 'lib/praxis/plugin.rb', line 8 def initialize(application, &block) @application = application @block = block end |
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application.
6 7 8 |
# File 'lib/praxis/plugin.rb', line 6 def application @application end |
#block ⇒ Object (readonly)
Returns the value of attribute block.
6 7 8 |
# File 'lib/praxis/plugin.rb', line 6 def block @block end |
Instance Method Details
#after(stage, &block) ⇒ Object
20 21 22 |
# File 'lib/praxis/plugin.rb', line 20 def after(stage,&block) application.bootloader.after(stage,&block) end |
#before(stage, &block) ⇒ Object
24 25 26 |
# File 'lib/praxis/plugin.rb', line 24 def before(stage,&block) application.bootloader.before(stage,&block) end |
#config ⇒ Object
13 14 15 |
# File 'lib/praxis/plugin.rb', line 13 def config @application.config end |
#setup! ⇒ Object
17 18 |
# File 'lib/praxis/plugin.rb', line 17 def setup! end |