Class: WAG::Data
Instance Attribute Summary collapse
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(offset, value) ⇒ Data
constructor
A new instance of Data.
- #to_sexpr ⇒ Object
Methods included from Encodable
Constructor Details
#initialize(offset, value) ⇒ Data
Returns a new instance of Data.
9 10 11 12 |
# File 'lib/wag/data.rb', line 9 def initialize(offset, value) @offset = offset.to_i @value = value end |
Instance Attribute Details
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
7 8 9 |
# File 'lib/wag/data.rb', line 7 def offset @offset end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/wag/data.rb', line 7 def value @value end |
Instance Method Details
#to_sexpr ⇒ Object
14 15 16 |
# File 'lib/wag/data.rb', line 14 def to_sexpr [:data, [:'i32.const', offset], value] end |