Flowdock
method

define_state_query_method

Importance_0
v2.3.8 - Show latest stable - 0 notes - Class: ActiveModel::StateMachine::ClassMethods
define_state_query_method(state_name) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/state_machine.rb, line 35
      def define_state_query_method(state_name)
        name = "#{state_name}?"
        undef_method(name) if method_defined?(name)
        class_eval "def #{name}; current_state.to_s == %(#{state_name}) end"
      end
Register or log in to add new notes.