Class: TEALrb::Box
- Inherits:
-
Object
- Object
- TEALrb::Box
- Defined in:
- lib/tealrb/box.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize(contract) ⇒ Box
constructor
A new instance of Box.
Constructor Details
#initialize(contract) ⇒ Box
Returns a new instance of Box.
5 6 7 |
# File 'lib/tealrb/box.rb', line 5 def initialize(contract) @contract = contract end |
Instance Method Details
#[](key) ⇒ Object
9 10 11 |
# File 'lib/tealrb/box.rb', line 9 def [](key) @contract.box_value key end |
#[]=(key, value) ⇒ Object
13 14 15 |
# File 'lib/tealrb/box.rb', line 13 def []=(key, value) @contract.box_put key, value end |