Class: RMonitor::Profile::DSL
- Inherits:
-
Object
- Object
- RMonitor::Profile::DSL
- Defined in:
- lib/rmonitor/profile/dsl.rb
Instance Attribute Summary collapse
-
#devices ⇒ Object
Returns the value of attribute devices.
Instance Method Summary collapse
- #device(name, options = {}) ⇒ Object
-
#initialize ⇒ DSL
constructor
A new instance of DSL.
Constructor Details
#initialize ⇒ DSL
Returns a new instance of DSL.
6 7 8 |
# File 'lib/rmonitor/profile/dsl.rb', line 6 def initialize @devices = [] end |
Instance Attribute Details
#devices ⇒ Object
Returns the value of attribute devices.
4 5 6 |
# File 'lib/rmonitor/profile/dsl.rb', line 4 def devices @devices end |
Instance Method Details
#device(name, options = {}) ⇒ Object
10 11 12 |
# File 'lib/rmonitor/profile/dsl.rb', line 10 def device(name, = {}) @devices << .merge(:name => name) end |