Class: C8dasm::Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/c8dasm/comment.rb

Instance Method Summary collapse

Constructor Details

#initialize(opcode) ⇒ Comment

Returns a new instance of Comment.



5
6
7
8
# File 'lib/c8dasm/comment.rb', line 5

def initialize(opcode)
  @opcode = opcode
  @comment = build_comment.to_s || '***WARNING*** UNKNOWN INSTRUCTION!'
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/c8dasm/comment.rb', line 10

def to_s
  @comment
end