Class: Shmidi::Controller

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/shmidi/controller.rb

Constant Summary

Constants included from Base

Base::CTYPE

Instance Attribute Summary collapse

Attributes included from Base

#_attachments, #_deleted, #_id, #_rev, #version

Instance Method Summary collapse

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

#internalsObject

Returns the value of attribute internals.



5
6
7
# File 'lib/shmidi/controller.rb', line 5

def internals
  @internals
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/shmidi/controller.rb', line 6

def name
  @name
end

Instance Method Details

#controlsObject



20
21
22
# File 'lib/shmidi/controller.rb', line 20

def controls
  @internals.last
end

#resetObject



12
13
14
# File 'lib/shmidi/controller.rb', line 12

def reset
  controls.values.each {|control| control.reset}
end

#socketsObject



16
17
18
# File 'lib/shmidi/controller.rb', line 16

def sockets
  @internals.first
end