Module: Agents::ErrorType

Included in:
Update
Defined in:
app/my_lib/agents/error_type.rb

Instance Method Summary collapse

Instance Method Details

#fatal_error?Boolean

No tolerance errors

Returns:

  • (Boolean)


20
21
22
# File 'app/my_lib/agents/error_type.rb', line 20

def fatal_error?
  error_type == :fatal
end

#inventory_error?Boolean

Used when inventory is not available

Returns:

  • (Boolean)


25
26
27
# File 'app/my_lib/agents/error_type.rb', line 25

def inventory_error?
  error_type == :inventory
end

#normal_error?Boolean

Toleranced / known errors

Returns:

  • (Boolean)


15
16
17
# File 'app/my_lib/agents/error_type.rb', line 15

def normal_error?
  error_type == :normal
end

#overwrite_error_type!(another_error_type) ⇒ Object



6
7
8
# File 'app/my_lib/agents/error_type.rb', line 6

def overwrite_error_type!(another_error_type)
  self.error_type = another_error_type
end