Class: RMonitor::DSLHelpers::DeviceBuilder
- Inherits:
-
Object
- Object
- RMonitor::DSLHelpers::DeviceBuilder
- Defined in:
- lib/rmonitor/helpers/dsl_helpers.rb
Instance Attribute Summary collapse
-
#devices ⇒ Object
Returns the value of attribute devices.
Instance Method Summary collapse
- #device(name, options = {}) ⇒ Object
-
#initialize ⇒ DeviceBuilder
constructor
A new instance of DeviceBuilder.
Constructor Details
#initialize ⇒ DeviceBuilder
Returns a new instance of DeviceBuilder.
29 30 31 |
# File 'lib/rmonitor/helpers/dsl_helpers.rb', line 29 def initialize @devices = [] end |
Instance Attribute Details
#devices ⇒ Object
Returns the value of attribute devices.
27 28 29 |
# File 'lib/rmonitor/helpers/dsl_helpers.rb', line 27 def devices @devices end |
Instance Method Details
#device(name, options = {}) ⇒ Object
33 34 35 |
# File 'lib/rmonitor/helpers/dsl_helpers.rb', line 33 def device(name, = {}) @devices << { :name => name }.merge() end |