Sha256: a377f71634b21cce428bc0798dd9642cd69cad2081113c166b806e8f0aa8c786

Contents?: true

Size: 558 Bytes

Versions: 8

Compression:

Stored size: 558 Bytes

Contents

module AASM

  class UnknownStateMachineError < RuntimeError; end

  class InvalidTransition < RuntimeError
    attr_reader :object, :event_name, :state_machine_name

    def initialize(object, event_name, state_machine_name)
      @object, @event_name, @state_machine_name = object, event_name, state_machine_name
    end

    def message
      "Event '#{event_name}' cannot transition from '#{object.aasm(state_machine_name).current_state}'"
    end
  end

  class UndefinedState < RuntimeError; end
  class NoDirectAssignmentError < RuntimeError; end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
aasm-4.7.0 lib/aasm/errors.rb
aasm-4.6.0 lib/aasm/errors.rb
aasm-4.5.2 lib/aasm/errors.rb
aasm-4.5.1 lib/aasm/errors.rb
aasm-4.5.0 lib/aasm/errors.rb
aasm-4.4.1 lib/aasm/errors.rb
aasm-4.4.0 lib/aasm/errors.rb
aasm-4.3.0 lib/aasm/errors.rb