Class: WAG::Instruction::F32::Const
- Inherits:
-
Object
- Object
- WAG::Instruction::F32::Const
- Includes:
- WAG::Instructable
- Defined in:
- lib/wag/instructions/f32/const.rb
Instance Attribute Summary collapse
-
#literal ⇒ Object
readonly
Returns the value of attribute literal.
Instance Method Summary collapse
-
#initialize(literal) ⇒ Const
constructor
A new instance of Const.
- #to_sexpr ⇒ Object
Methods included from WAG::Instructable
#f32, #f64, #i32, #i64, #local, #memory
Constructor Details
#initialize(literal) ⇒ Const
Returns a new instance of Const.
10 11 12 13 |
# File 'lib/wag/instructions/f32/const.rb', line 10 def initialize(literal) @literal = literal.to_f super() end |
Instance Attribute Details
#literal ⇒ Object (readonly)
Returns the value of attribute literal.
8 9 10 |
# File 'lib/wag/instructions/f32/const.rb', line 8 def literal @literal end |
Instance Method Details
#to_sexpr ⇒ Object
15 16 17 |
# File 'lib/wag/instructions/f32/const.rb', line 15 def to_sexpr [name, @literal] end |