Class: WAG::Element
Instance Attribute Summary collapse
-
#labels ⇒ Object
readonly
Returns the value of attribute labels.
-
#table_id ⇒ Object
readonly
Returns the value of attribute table_id.
Instance Method Summary collapse
-
#initialize(table_id, *labels) ⇒ Element
constructor
A new instance of Element.
- #to_sexpr ⇒ Object
Methods included from Encodable
Constructor Details
Instance Attribute Details
#labels ⇒ Object (readonly)
Returns the value of attribute labels.
7 8 9 |
# File 'lib/wag/element.rb', line 7 def labels @labels end |
#table_id ⇒ Object (readonly)
Returns the value of attribute table_id.
7 8 9 |
# File 'lib/wag/element.rb', line 7 def table_id @table_id end |
Instance Method Details
#to_sexpr ⇒ Object
14 15 16 |
# File 'lib/wag/element.rb', line 14 def to_sexpr [:elem, [:'i32.const', table_id]].concat(labels.map(&:to_sexpr)) end |