Class: TEALrb::Box

Inherits:
Object
  • Object
show all
Defined in:
lib/tealrb/box.rb

Instance Method Summary collapse

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