Class: Shmidi::Controller
- Inherits:
-
Object
- Object
- Shmidi::Controller
- Includes:
- Base
- Defined in:
- lib/shmidi/controller.rb
Constant Summary
Constants included from Base
Instance Attribute Summary collapse
-
#internals ⇒ Object
Returns the value of attribute internals.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes included from Base
#_attachments, #_deleted, #_id, #_rev, #version
Instance Method Summary collapse
- #controls ⇒ Object
-
#initialize(name) ⇒ Controller
constructor
A new instance of Controller.
- #reset ⇒ Object
- #sockets ⇒ Object
Methods included from Base
#[], #[]=, #clone, #dump, #etag, included, #init, #inspect, #to_hash, #to_s
Constructor Details
#initialize(name) ⇒ Controller
7 8 9 10 |
# File 'lib/shmidi/controller.rb', line 7 def initialize(name) @name = name @internals = [[], {}] end |
Instance Attribute Details
#internals ⇒ Object
Returns the value of attribute internals.
5 6 7 |
# File 'lib/shmidi/controller.rb', line 5 def internals @internals end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/shmidi/controller.rb', line 6 def name @name end |
Instance Method Details
#controls ⇒ Object
20 21 22 |
# File 'lib/shmidi/controller.rb', line 20 def controls @internals.last end |
#reset ⇒ Object
12 13 14 |
# File 'lib/shmidi/controller.rb', line 12 def reset controls.values.each {|control| control.reset} end |
#sockets ⇒ Object
16 17 18 |
# File 'lib/shmidi/controller.rb', line 16 def sockets @internals.first end |