Class: TEALrb::OpcodeType
- Inherits:
-
Object
- Object
- TEALrb::OpcodeType
- Defined in:
- lib/tealrb/opcode_type.rb
Instance Method Summary collapse
- #[](index) ⇒ Object
-
#initialize(contract) ⇒ OpcodeType
constructor
A new instance of OpcodeType.
Constructor Details
#initialize(contract) ⇒ OpcodeType
Returns a new instance of OpcodeType.
17 18 19 |
# File 'lib/tealrb/opcode_type.rb', line 17 def initialize(contract) @contract = contract end |
Instance Method Details
#[](index) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/tealrb/opcode_type.rb', line 21 def [](index) if index.is_a?(Integer) @contract.txna @field, index else @contract.txnas @field end self end |