Class: DpStmMap::AtomicReadView

Inherits:
Object
  • Object
show all
Defined in:
lib/dp_stm_map/InMemoryStmMap.rb

Instance Method Summary collapse

Constructor Details

#initialize(state) ⇒ AtomicReadView

Returns a new instance of AtomicReadView.



80
81
82
# File 'lib/dp_stm_map/InMemoryStmMap.rb', line 80

def initialize state
  @state=state
end

Instance Method Details

#[](key) ⇒ Object



84
85
86
# File 'lib/dp_stm_map/InMemoryStmMap.rb', line 84

def [] key
  @state[key]
end

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


88
89
90
# File 'lib/dp_stm_map/InMemoryStmMap.rb', line 88

def has_key? key
  @state.has_key? key
end