Class: Shmidi::Control
Constant Summary
Constants included from Base
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#note ⇒ Object
Returns the value of attribute note.
Attributes included from Base
#_attachments, #_deleted, #_id, #_rev, #version
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(socket, channel, note) ⇒ Control
constructor
A new instance of Control.
- #socket ⇒ Object
Methods included from Base
#[], #[]=, #clone, #dump, #etag, included, #init, #inspect, #reset, #to_hash, #to_s
Constructor Details
#initialize(socket, channel, note) ⇒ Control
Returns a new instance of Control.
11 12 13 14 15 |
# File 'lib/shmidi/control.rb', line 11 def initialize(socket, channel, note) @socket = socket @channel = channel @note = note end |
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
5 6 7 |
# File 'lib/shmidi/control.rb', line 5 def channel @channel end |
#note ⇒ Object
Returns the value of attribute note.
5 6 7 |
# File 'lib/shmidi/control.rb', line 5 def note @note end |
Instance Method Details
#id ⇒ Object
17 18 19 |
# File 'lib/shmidi/control.rb', line 17 def id "#{@channel}:#{@note}" end |
#socket ⇒ Object
7 8 9 |
# File 'lib/shmidi/control.rb', line 7 def socket Socket[@socket] end |