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.
| 18 19 20 | # File 'lib/state_machines/error.rb', line 18 def initialize(name) super(nil, "#{name.inspect} is an invalid integration. #{}") end | 
Instance Method Details
#error_message ⇒ Object
| 34 35 36 37 38 39 40 | # File 'lib/state_machines/error.rb', line 34 def if Integrations.list.size.zero? no_integrations else valid_integrations end end | 
#no_integrations ⇒ Object
| 30 31 32 | # File 'lib/state_machines/error.rb', line 30 def no_integrations 'No integrations registered' end | 
#valid_integrations ⇒ Object
| 22 23 24 | # File 'lib/state_machines/error.rb', line 22 def valid_integrations "Valid integrations are: #{valid_integrations_name}" end | 
#valid_integrations_name ⇒ Object
| 26 27 28 | # File 'lib/state_machines/error.rb', line 26 def valid_integrations_name Integrations.list.collect(&:integration_name) end |