Exception: StateMachines::IntegrationNotFound
- Defined in:
- lib/state_machines/error.rb
Overview
An invalid integration was specified
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
- #error_message ⇒ Object
-
#initialize(name) ⇒ IntegrationNotFound
constructor
A new instance of IntegrationNotFound.
- #no_integrations ⇒ Object
- #valid_integrations ⇒ Object
- #valid_integrations_name ⇒ Object
Constructor Details
#initialize(name) ⇒ IntegrationNotFound
Returns a new instance of IntegrationNotFound.
16 17 18 |
# File 'lib/state_machines/error.rb', line 16 def initialize(name) super(nil, "#{name.inspect} is an invalid integration. #{}") end |
Instance Method Details
#error_message ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/state_machines/error.rb', line 32 def if Integrations.list.size.zero? no_integrations else valid_integrations end end |
#no_integrations ⇒ Object
28 29 30 |
# File 'lib/state_machines/error.rb', line 28 def no_integrations 'No integrations registered' end |
#valid_integrations ⇒ Object
20 21 22 |
# File 'lib/state_machines/error.rb', line 20 def valid_integrations "Valid integrations are: #{valid_integrations_name}" end |
#valid_integrations_name ⇒ Object
24 25 26 |
# File 'lib/state_machines/error.rb', line 24 def valid_integrations_name Integrations.list.collect(&:integration_name) end |