Class: WAG::Instruction::Base
- Inherits:
-
Object
- Object
- WAG::Instruction::Base
show all
- Includes:
- Encodable
- Defined in:
- lib/wag/instructions/base.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Encodable
#to_wasm, #to_wat
Class Method Details
.instruction(op_code) ⇒ Object
8
9
10
11
12
|
# File 'lib/wag/instructions/base.rb', line 8
def self.instruction(op_code)
klass = Class.new(self)
klass.define_method(:op_code) { op_code }
klass
end
|
Instance Method Details
#to_sexpr ⇒ Object
19
20
21
|
# File 'lib/wag/instructions/base.rb', line 19
def to_sexpr
name.to_sym
end
|