Class: RMonitor::Actions::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/rmonitor/actions/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDSL

Returns a new instance of DSL.



6
7
8
# File 'lib/rmonitor/actions/dsl.rb', line 6

def initialize
  @actions = []
end

Instance Attribute Details

#actionsObject

Returns the value of attribute actions.



4
5
6
# File 'lib/rmonitor/actions/dsl.rb', line 4

def actions
  @actions
end

Instance Method Details

#dpi(value) ⇒ Object



18
19
20
# File 'lib/rmonitor/actions/dsl.rb', line 18

def dpi(value)
  @actions << {:action => :option, :name => :dpi, :value => value}
end

#off(name) ⇒ Object



10
11
12
# File 'lib/rmonitor/actions/dsl.rb', line 10

def off(name)
  @actions << {:action => :off, :name => name}
end

#on(name, options = {}) ⇒ Object



14
15
16
# File 'lib/rmonitor/actions/dsl.rb', line 14

def on(name, options = {})
  @actions << options.merge(:action => :on, :name => name)
end