class SyncWrap::StateHash
The SyncWrap::Context#state Hash-like implementation, backed read-only by the associated host properties.
Public Class Methods
new( host )
click to toggle source
# File lib/syncwrap/context.rb, line 293 def initialize( host ) @host = host @props = {} end
Public Instance Methods
[]( key )
click to toggle source
# File lib/syncwrap/context.rb, line 298 def []( key ) if @props.has_key?( key ) @props[ key ] else @host[ key ] end end
[]=( key, val )
click to toggle source
# File lib/syncwrap/context.rb, line 306 def []=( key, val ) @props[ key.to_sym ] = val end