Class: MonomeSerial::SerialCommunicator::DummyCommunicator

Inherits:
Communicator
  • Object
show all
Defined in:
lib/monome_serial/serial_communicator/dummy_communicator.rb

Overview

Dummy class with no actual serial connection (so tests can execute in other Ruby environments)

Instance Method Summary collapse

Constructor Details

#initializeDummyCommunicator

Returns a new instance of DummyCommunicator.



6
7
# File 'lib/monome_serial/serial_communicator/dummy_communicator.rb', line 6

def initialize
end

Instance Method Details

#modelObject



21
22
23
# File 'lib/monome_serial/serial_communicator/dummy_communicator.rb', line 21

def model
  "256"
end

#readObject



9
10
11
12
# File 'lib/monome_serial/serial_communicator/dummy_communicator.rb', line 9

def read
  #super
  [:keydown, 1, 1]
end

#real?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/monome_serial/serial_communicator/dummy_communicator.rb', line 17

def real?
  false
end

#serialObject



25
26
27
# File 'lib/monome_serial/serial_communicator/dummy_communicator.rb', line 25

def serial
  "007"
end

#write(strings) ⇒ Object



14
15
# File 'lib/monome_serial/serial_communicator/dummy_communicator.rb', line 14

def write(strings)
end