Methods
- A
Classes and Modules
- MODULE AASM::ClassMethods
- MODULE AASM::Persistence
- MODULE AASM::SupportingClasses
- CLASS AASM::InvalidTransition
- CLASS AASM::StateMachine
- CLASS AASM::UndefinedState
Instance Public methods
Instance methods
# File lib/aasm/aasm.rb, line 75 def aasm_current_state return @aasm_current_state if @aasm_current_state if self.respond_to?(:aasm_read_state) || self.private_methods.include?('aasm_read_state') @aasm_current_state = aasm_read_state end return @aasm_current_state if @aasm_current_state aasm_enter_initial_state end
# File lib/aasm/aasm.rb, line 86 def aasm_enter_initial_state state_name = aasm_determine_state_name(self.class.aasm_initial_state) state = aasm_state_object_for_state(state_name) state.call_action(:before_enter, self) state.call_action(:enter, self) self.aasm_current_state = state_name state.call_action(:after_enter, self) state_name end