Class: DpStmMap::AtomicReadView
- Inherits:
-
Object
- Object
- DpStmMap::AtomicReadView
- Defined in:
- lib/dp_stm_map/InMemoryStmMap.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #has_key?(key) ⇒ Boolean
-
#initialize(state) ⇒ AtomicReadView
constructor
A new instance of AtomicReadView.
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
88 89 90 |
# File 'lib/dp_stm_map/InMemoryStmMap.rb', line 88 def has_key? key @state.has_key? key end |