Module: Stateoscope::Integrations

Defined in:
lib/stateoscope/integrations.rb,
lib/stateoscope/integrations/aasm.rb

Defined Under Namespace

Classes: AASM

Class Method Summary collapse

Class Method Details

.new_for(klass, state_machine_name) ⇒ Object


6
7
8
9
10
11
12
# File 'lib/stateoscope/integrations.rb', line 6

def self.new_for(klass, state_machine_name)
  if klass.ancestors.include?(::AASM)
    ::Stateoscope::Integrations::AASM.new(klass, state_machine_name)
  else
    fail NotImplementedError, "unsupported state machine implementation"
  end
end