Class: SharedMemory
- Inherits:
-
Object
- Object
- SharedMemory
- Defined in:
- lib/sharedmem/shared_memory.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#prefix ⇒ Object
Returns the value of attribute prefix.
Instance Method Summary collapse
- #[](name) ⇒ Object
- #[]=(name, value) ⇒ Object
- #dispose ⇒ Object
- #get(name) ⇒ Object
-
#initialize ⇒ SharedMemory
constructor
A new instance of SharedMemory.
- #push_prefix(prefix) ⇒ Object
- #set(name, value) ⇒ Object
Constructor Details
#initialize ⇒ SharedMemory
Returns a new instance of SharedMemory.
4 5 6 |
# File 'lib/sharedmem/shared_memory.rb', line 4 def initialize @prefix = "" end |
Instance Attribute Details
#prefix ⇒ Object
Returns the value of attribute prefix.
2 3 4 |
# File 'lib/sharedmem/shared_memory.rb', line 2 def prefix @prefix end |
Instance Method Details
#[](name) ⇒ Object
19 20 21 |
# File 'lib/sharedmem/shared_memory.rb', line 19 def [](name) get @prefix+name end |
#[]=(name, value) ⇒ Object
22 23 24 |
# File 'lib/sharedmem/shared_memory.rb', line 22 def []=(name,value) set @prefix+name, value end |
#dispose ⇒ Object
7 8 |
# File 'lib/sharedmem/shared_memory.rb', line 7 def dispose end |
#get(name) ⇒ Object
14 15 |
# File 'lib/sharedmem/shared_memory.rb', line 14 def get(name) end |
#push_prefix(prefix) ⇒ Object
10 11 12 |
# File 'lib/sharedmem/shared_memory.rb', line 10 def push_prefix(prefix) @prefix += prefix end |
#set(name, value) ⇒ Object
16 17 |
# File 'lib/sharedmem/shared_memory.rb', line 16 def set(name, value) end |