state.rb

Path: lib/action_flow/state.rb
Last Update: Tue May 01 14:16:37 -0400 2007

Methods

[]   []=   included   state   state=  

Public Class methods

adds ActionView helper methods

[Source]

# File lib/action_flow/state.rb, line 65
    def self.included(base)
      base.send :helper_method, :state
    end

Public Instance methods

Does the same as state(k)

[Source]

# File lib/action_flow/state.rb, line 57
    def [](k)
      
      return session[ flow_session_name ].fetch( state_session_name ).fetch( k )
      
    end

Does the sasme as state(k,v)

[Source]

# File lib/action_flow/state.rb, line 51
    def []=(k, v)
      return session[ flow_session_name ].fetch( state_session_name ).store( k.to_s, v )
    end

Returns the state data hash

[Source]

# File lib/action_flow/state.rb, line 38
    def state
      
      return session[ flow_session_name ].fetch( state_session_name )
      
    end

Changes the state hash for another one

[Source]

# File lib/action_flow/state.rb, line 45
    def state=(hash)
      session[ flow_session_name ].store( state_session_name, hash )
      return state
    end

[Validate]