method

new

rails latest stable - Class: ActiveModel::StateMachine::State

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

new(name, options = {})
public

No documentation available.

# File activemodel/lib/active_model/state_machine/state.rb, line 6
      def initialize(name, options = {})
        @name = name
        if machine = options.delete(:machine)
          machine.klass.define_state_query_method(name)
        end
        update(options)
      end