class SocketSwitcher::Device
Attributes
number[R]
port[R]
Public Class Methods
new(port, number)
click to toggle source
# File lib/socket_switcher/device.rb, line 2 def initialize(port, number) @port = port @number = number end
Public Instance Methods
off()
click to toggle source
# File lib/socket_switcher/device.rb, line 15 def off @port.__send__(:set_state, self, 0) end
on()
click to toggle source
# File lib/socket_switcher/device.rb, line 11 def on @port.__send__(:set_state, self, 1) end
to_s()
click to toggle source
# File lib/socket_switcher/device.rb, line 19 def to_s "#<#{self.class} number=#{number}>" end
Also aliased as: inspect