Module: Yapra::Plugin::ContextAware
- Included in:
- Base
- Defined in:
- lib/yapra/plugin/context_aware.rb
Instance Attribute Summary collapse
-
#pipeline ⇒ Object
Returns the value of attribute pipeline.
-
#plugin_config ⇒ Object
Returns the value of attribute plugin_config.
-
#yapra ⇒ Object
Returns the value of attribute yapra.
Instance Method Summary collapse
Instance Attribute Details
#pipeline ⇒ Object
Returns the value of attribute pipeline.
4 5 6 |
# File 'lib/yapra/plugin/context_aware.rb', line 4 def pipeline @pipeline end |
#plugin_config ⇒ Object
Returns the value of attribute plugin_config.
4 5 6 |
# File 'lib/yapra/plugin/context_aware.rb', line 4 def plugin_config @plugin_config end |
#yapra ⇒ Object
Returns the value of attribute yapra.
4 5 6 |
# File 'lib/yapra/plugin/context_aware.rb', line 4 def yapra @yapra end |
Instance Method Details
#config ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/yapra/plugin/context_aware.rb', line 6 def config @config ||= nil unless @config @config = {}.update(yapra.env).update(pipeline.context) @config.update(plugin_config) if plugin_config end @config end |