Class: WAG::WAT
- Inherits:
-
Object
- Object
- WAG::WAT
- Defined in:
- lib/wag/wat.rb
Overview
A container for the WebAssembly text format.
Instance Method Summary collapse
-
#initialize(source) ⇒ WAT
constructor
A new instance of WAT.
- #to_s ⇒ Object
- #to_wasm ⇒ Object
Constructor Details
#initialize(source) ⇒ WAT
Returns a new instance of WAT.
6 7 8 |
# File 'lib/wag/wat.rb', line 6 def initialize(source) @source = source end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/wag/wat.rb', line 14 def to_s @source end |
#to_wasm ⇒ Object
10 11 12 |
# File 'lib/wag/wat.rb', line 10 def to_wasm WAG::WASM.new(WAG::WABT.new.wat2wasm(@source)) end |