Class: Sonar::Connector::ExecutionContext
- Inherits:
-
Object
- Object
- Sonar::Connector::ExecutionContext
- Defined in:
- lib/sonar_connector/consumer.rb
Overview
Command execution context, whereby commands can be injected with consumer context variables for the logger and status objects.
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#log ⇒ Object
readonly
Returns the value of attribute log.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(params) ⇒ ExecutionContext
constructor
A new instance of ExecutionContext.
Constructor Details
#initialize(params) ⇒ ExecutionContext
Returns a new instance of ExecutionContext.
11 12 13 14 15 16 17 18 |
# File 'lib/sonar_connector/consumer.rb', line 11 def initialize(params) @log = params[:log] @status = params[:status] # pass the controller all the way from the consumer initialisation into the command execution context, # so that we can call privileged methods such as shutdown. @controller = params[:controller] end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
9 10 11 |
# File 'lib/sonar_connector/consumer.rb', line 9 def controller @controller end |
#log ⇒ Object (readonly)
Returns the value of attribute log.
7 8 9 |
# File 'lib/sonar_connector/consumer.rb', line 7 def log @log end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/sonar_connector/consumer.rb', line 8 def status @status end |