Class: AmstradGpt::Interface
- Inherits:
-
Object
- Object
- AmstradGpt::Interface
- Defined in:
- lib/amstrad_gpt/interface.rb
Instance Method Summary collapse
-
#initialize(tty:) ⇒ Interface
constructor
A new instance of Interface.
- #next_character ⇒ Object
- #shutdown ⇒ Object
Constructor Details
#initialize(tty:) ⇒ Interface
Returns a new instance of Interface.
5 6 7 |
# File 'lib/amstrad_gpt/interface.rb', line 5 def initialize(tty:) @tty = tty end |
Instance Method Details
#next_character ⇒ Object
15 16 17 |
# File 'lib/amstrad_gpt/interface.rb', line 15 def next_character serial_port.getbyte rescue nil end |
#shutdown ⇒ Object
9 10 11 |
# File 'lib/amstrad_gpt/interface.rb', line 9 def shutdown serial_port.close end |