Module: Denko::Behaviors::State
Instance Method Summary collapse
Instance Method Details
#initialize(options = {}) ⇒ Object
4 5 6 7 8 |
# File 'lib/denko/behaviors/state.rb', line 4 def initialize(={}) # Component includes State, so no need to call super here. @state_mutex = Mutex.new @state = nil end |
#state ⇒ Object
10 11 12 |
# File 'lib/denko/behaviors/state.rb', line 10 def state @state_mutex.synchronize { @state } end |