Class: Tina4::ServiceContext
- Inherits:
-
Object
- Object
- Tina4::ServiceContext
- Defined in:
- lib/tina4/service_runner.rb
Overview
Context object passed to each service handler, giving it control over its own lifecycle and metadata.
Instance Attribute Summary collapse
-
#error_count ⇒ Object
Returns the value of attribute error_count.
-
#last_run ⇒ Object
Returns the value of attribute last_run.
-
#name ⇒ Object
Returns the value of attribute name.
-
#running ⇒ Object
Returns the value of attribute running.
Instance Method Summary collapse
-
#initialize(name) ⇒ ServiceContext
constructor
A new instance of ServiceContext.
Constructor Details
#initialize(name) ⇒ ServiceContext
Returns a new instance of ServiceContext.
9 10 11 12 13 14 |
# File 'lib/tina4/service_runner.rb', line 9 def initialize(name) @running = true @last_run = nil @name = name @error_count = 0 end |
Instance Attribute Details
#error_count ⇒ Object
Returns the value of attribute error_count.
7 8 9 |
# File 'lib/tina4/service_runner.rb', line 7 def error_count @error_count end |
#last_run ⇒ Object
Returns the value of attribute last_run.
7 8 9 |
# File 'lib/tina4/service_runner.rb', line 7 def last_run @last_run end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/tina4/service_runner.rb', line 7 def name @name end |
#running ⇒ Object
Returns the value of attribute running.
7 8 9 |
# File 'lib/tina4/service_runner.rb', line 7 def running @running end |