Class: SCASM::Data
Instance Attribute Summary
Attributes inherited from Statement
Instance Method Summary collapse
- #assemble(io) ⇒ Object
-
#initialize(words) ⇒ Data
constructor
A new instance of Data.
- #to_s ⇒ Object
Methods inherited from Statement
Constructor Details
#initialize(words) ⇒ Data
Returns a new instance of Data.
56 57 58 |
# File 'lib/scasm/statement.rb', line 56 def initialize words @words = words end |
Instance Method Details
#assemble(io) ⇒ Object
60 61 62 |
# File 'lib/scasm/statement.rb', line 60 def assemble io io.write @words.pack('v*') end |
#to_s ⇒ Object
64 65 66 |
# File 'lib/scasm/statement.rb', line 64 def to_s "data #{@words * ', '}" end |