class WAG::Instruction::If
Public Instance Methods
result(*types)
click to toggle source
# File lib/wag/instructions/if.rb, line 7 def result(*types) @result = WAG::Result.new(*types) end
then(&block)
click to toggle source
# File lib/wag/instructions/if.rb, line 11 def then(&block) instruction = WAG::Then.new instructions << instruction instruction.instance_exec(&block) if block instruction end
Also aliased as: then_
to_sexpr()
click to toggle source
Calls superclass method
# File lib/wag/instructions/if.rb, line 19 def to_sexpr return [name, @result.to_sexpr] if @result super() end