Class: Expeditor::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/expeditor/status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStatus

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

#breakObject

Returns the value of attribute break.



7
8
9
# File 'lib/expeditor/status.rb', line 7

def break
  @break
end

#dependencyObject

Returns the value of attribute dependency.



8
9
10
# File 'lib/expeditor/status.rb', line 8

def dependency
  @dependency
end

#failureObject

Returns the value of attribute failure.



4
5
6
# File 'lib/expeditor/status.rb', line 4

def failure
  @failure
end

#rejectionObject

Returns the value of attribute rejection.



5
6
7
# File 'lib/expeditor/status.rb', line 5

def rejection
  @rejection
end

#successObject

Returns the value of attribute success.



3
4
5
# File 'lib/expeditor/status.rb', line 3

def success
  @success
end

#timeoutObject

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

#resetObject



32
33
34
# File 'lib/expeditor/status.rb', line 32

def reset
  set(0, 0, 0, 0, 0, 0)
end