Class: Decoder
- Inherits:
-
Object
- Object
- Decoder
- Defined in:
- lib/remian/decoder.rb
Instance Method Summary collapse
Instance Method Details
#parse(instruction) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/remian/decoder.rb', line 2 def parse instruction instruction = instruction.to_s components = instruction.to_s.split " " return { skip: instruction[0] == "#", opcode: components.shift, operands: components } end |