Class: Rnes::Rom
- Inherits:
-
Object
- Object
- Rnes::Rom
- Defined in:
- lib/rnes/rom.rb
Instance Method Summary collapse
- #bytesize ⇒ Integer
-
#initialize(bytes:) ⇒ Rom
constructor
A new instance of Rom.
- #read(address) ⇒ Object
Constructor Details
#initialize(bytes:) ⇒ Rom
Returns a new instance of Rom.
4 5 6 |
# File 'lib/rnes/rom.rb', line 4 def initialize(bytes:) @bytes = bytes end |
Instance Method Details
#bytesize ⇒ Integer
9 10 11 |
# File 'lib/rnes/rom.rb', line 9 def bytesize @bytes.length end |
#read(address) ⇒ Object
15 16 17 |
# File 'lib/rnes/rom.rb', line 15 def read(address) @bytes[address] end |