Class: WhippedCream::Plugin
- Inherits:
-
Object
- Object
- WhippedCream::Plugin
- Defined in:
- lib/whipped-cream/plugin.rb
Overview
Data representation of a Plugin
Instance Attribute Summary collapse
-
#camera ⇒ Object
Returns the value of attribute camera.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#camera ⇒ Object
Returns the value of attribute camera.
4 5 6 |
# File 'lib/whipped-cream/plugin.rb', line 4 def camera @camera end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/whipped-cream/plugin.rb', line 4 def name @name end |
Class Method Details
.build(&block) ⇒ Object
6 7 8 |
# File 'lib/whipped-cream/plugin.rb', line 6 def self.build(&block) Builder.build(&block) end |
.from_file(path) ⇒ Object
10 11 12 |
# File 'lib/whipped-cream/plugin.rb', line 10 def self.from_file(path) Builder.from_file(path) end |
.from_string(string) ⇒ Object
14 15 16 |
# File 'lib/whipped-cream/plugin.rb', line 14 def self.from_string(string) Builder.from_string(string) end |
Instance Method Details
#buttons ⇒ Object
22 23 24 |
# File 'lib/whipped-cream/plugin.rb', line 22 def controls.select { |control| control.is_a? Button } end |
#controls ⇒ Object
18 19 20 |
# File 'lib/whipped-cream/plugin.rb', line 18 def controls @controls ||= [] end |
#fields ⇒ Object
26 27 28 |
# File 'lib/whipped-cream/plugin.rb', line 26 def fields controls.select { |control| control.is_a? Field } end |
#sensors ⇒ Object
30 31 32 |
# File 'lib/whipped-cream/plugin.rb', line 30 def sensors controls.select { |control| control.is_a? Sensor } end |
#switches ⇒ Object
34 35 36 |
# File 'lib/whipped-cream/plugin.rb', line 34 def switches controls.select { |control| control.is_a? Switch } end |