Parent

Class Index [+]

Quicksearch

Mocha::StateMachine::State

Provides a mechanism to change the state of a {StateMachine} at some point in the future.

Public Class Methods

new(state_machine, state) click to toggle source

@private

    # File lib/mocha/state_machine.rb, line 11
11:       def initialize(state_machine, state)
12:         @state_machine, @state = state_machine, state
13:       end

Public Instance Methods

activate() click to toggle source

@private

    # File lib/mocha/state_machine.rb, line 16
16:       def activate
17:         @state_machine.current_state = @state
18:       end
active?() click to toggle source

@private

    # File lib/mocha/state_machine.rb, line 21
21:       def active?
22:         @state_machine.current_state == @state
23:       end
mocha_inspect() click to toggle source

@private

    # File lib/mocha/state_machine.rb, line 26
26:       def mocha_inspect
27:         "#{@state_machine.name} is #{@state.mocha_inspect}"
28:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.