Class: Expeditor::Status
- Inherits:
-
Object
- Object
- Expeditor::Status
- Defined in:
- lib/expeditor/status.rb
Instance Attribute Summary collapse
-
#break ⇒ Object
Returns the value of attribute break.
-
#dependency ⇒ Object
Returns the value of attribute dependency.
-
#failure ⇒ Object
Returns the value of attribute failure.
-
#rejection ⇒ Object
Returns the value of attribute rejection.
-
#success ⇒ Object
Returns the value of attribute success.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
- #increment(type) ⇒ Object
-
#initialize ⇒ Status
constructor
A new instance of Status.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Status
Returns a new instance of Status.
10 11 12 |
# File 'lib/expeditor/status.rb', line 10 def initialize set(0, 0, 0, 0, 0, 0) end |
Instance Attribute Details
#break ⇒ Object
Returns the value of attribute break.
7 8 9 |
# File 'lib/expeditor/status.rb', line 7 def break @break end |
#dependency ⇒ Object
Returns the value of attribute dependency.
8 9 10 |
# File 'lib/expeditor/status.rb', line 8 def dependency @dependency end |
#failure ⇒ Object
Returns the value of attribute failure.
4 5 6 |
# File 'lib/expeditor/status.rb', line 4 def failure @failure end |
#rejection ⇒ Object
Returns the value of attribute rejection.
5 6 7 |
# File 'lib/expeditor/status.rb', line 5 def rejection @rejection end |
#success ⇒ Object
Returns the value of attribute success.
3 4 5 |
# File 'lib/expeditor/status.rb', line 3 def success @success end |
#timeout ⇒ Object
Returns the value of attribute timeout.
6 7 8 |
# File 'lib/expeditor/status.rb', line 6 def timeout @timeout end |
Instance Method Details
#increment(type) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/expeditor/status.rb', line 14 def increment(type) case type when :success @success += 1 when :failure @failure += 1 when :rejection @rejection += 1 when :timeout @timeout += 1 when :break @break += 1 when :dependency @dependency += 1 else end end |
#reset ⇒ Object
32 33 34 |
# File 'lib/expeditor/status.rb', line 32 def reset set(0, 0, 0, 0, 0, 0) end |