Module: Yapra::Plugin::ContextAware

Included in:
Base
Defined in:
lib/yapra/plugin/context_aware.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pipelineObject

Returns the value of attribute pipeline.



4
5
6
# File 'lib/yapra/plugin/context_aware.rb', line 4

def pipeline
  @pipeline
end

#plugin_configObject

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

#yapraObject

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

#configObject



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