Class: Qs::Runner
- Inherits:
-
Object
- Object
- Qs::Runner
- Defined in:
- lib/qs/runner.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
-
#handler_class ⇒ Object
readonly
Returns the value of attribute handler_class.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #halt ⇒ Object
-
#initialize(handler_class, args = nil) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(handler_class, args = nil) ⇒ Runner
Returns a new instance of Runner.
10 11 12 13 14 15 16 17 18 |
# File 'lib/qs/runner.rb', line 10 def initialize(handler_class, args = nil) args ||= {} @logger = args[:logger] || Qs::NullLogger.new @message = args[:message] @params = args[:params] || {} @handler_class = handler_class @handler = @handler_class.new(self) end |
Instance Attribute Details
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
7 8 9 |
# File 'lib/qs/runner.rb', line 7 def handler @handler end |
#handler_class ⇒ Object (readonly)
Returns the value of attribute handler_class.
7 8 9 |
# File 'lib/qs/runner.rb', line 7 def handler_class @handler_class end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
8 9 10 |
# File 'lib/qs/runner.rb', line 8 def logger @logger end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
8 9 10 |
# File 'lib/qs/runner.rb', line 8 def @message end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
8 9 10 |
# File 'lib/qs/runner.rb', line 8 def params @params end |
Instance Method Details
#halt ⇒ Object
24 25 26 |
# File 'lib/qs/runner.rb', line 24 def halt throw :halt end |
#run ⇒ Object
20 21 22 |
# File 'lib/qs/runner.rb', line 20 def run raise NotImplementedError end |