Class: C8dasm::Comment
- Inherits:
-
Object
- Object
- C8dasm::Comment
- Defined in:
- lib/c8dasm/comment.rb
Instance Method Summary collapse
-
#initialize(opcode) ⇒ Comment
constructor
A new instance of Comment.
- #to_s ⇒ Object
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_s ⇒ Object
10 11 12 |
# File 'lib/c8dasm/comment.rb', line 10 def to_s @comment end |