Class: Praxis::Plugin
- Inherits:
-
Object
show all
- Defined in:
- lib/praxis/plugin.rb
Overview
one instance is created per use.
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#application ⇒ Object
Returns the value of attribute application.
6
7
8
|
# File 'lib/praxis/plugin.rb', line 6
def application
@application
end
|
#block ⇒ Object
Returns the value of attribute block.
6
7
8
|
# File 'lib/praxis/plugin.rb', line 6
def block
@block
end
|
#config ⇒ Object
Returns the value of attribute config.
6
7
8
|
# File 'lib/praxis/plugin.rb', line 6
def config
@config
end
|
#config_attribute ⇒ Object
Returns the value of attribute config_attribute.
6
7
8
|
# File 'lib/praxis/plugin.rb', line 6
def config_attribute
@config_attribute
end
|
Instance Method Details
#after(stage, &block) ⇒ Object
29
30
31
|
# File 'lib/praxis/plugin.rb', line 29
def after(stage, &block)
application.bootloader.after(stage, &block)
end
|
#before(stage, &block) ⇒ Object
33
34
35
|
# File 'lib/praxis/plugin.rb', line 33
def before(stage, &block)
application.bootloader.before(stage, &block)
end
|
#config_key ⇒ Object
12
|
# File 'lib/praxis/plugin.rb', line 12
def config_key; end
|
#load_config! ⇒ Object
16
17
18
19
20
21
|
# File 'lib/praxis/plugin.rb', line 16
def load_config!
return unless options.key?(:config_file)
return {} unless (application.root + options[:config_file]).exist?
YAML.load_file(application.root + options[:config_file])
end
|
#options ⇒ Object
8
9
10
|
# File 'lib/praxis/plugin.rb', line 8
def options
@options ||= {}
end
|
#prepare_config!(node) ⇒ Object
14
|
# File 'lib/praxis/plugin.rb', line 14
def prepare_config!(node); end
|
#register_doc_browser_plugin(path) ⇒ Object
25
26
27
|
# File 'lib/praxis/plugin.rb', line 25
def register_doc_browser_plugin(path)
application.doc_browser_plugin_paths << File.expand_path(path)
end
|
#setup! ⇒ Object
23
|
# File 'lib/praxis/plugin.rb', line 23
def setup!; end
|