Module: Interferon::DSLMixin

Included in:
AlertDSL, MetricDSL, NotifyDSL
Defined in:
lib/interferon/alert_dsl.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *_args) ⇒ Object

Raises:

  • (ArgumentError)


9
10
11
# File 'lib/interferon/alert_dsl.rb', line 9

def method_missing(meth, *_args)
  raise ArgumentError, "No such alerts field '#{meth}'"
end

Instance Method Details

#[](arg) ⇒ Object



13
14
15
# File 'lib/interferon/alert_dsl.rb', line 13

def [](arg)
  send(arg)
end

#initialize(hostinfo) ⇒ Object



5
6
7
# File 'lib/interferon/alert_dsl.rb', line 5

def initialize(hostinfo)
  @hostinfo = hostinfo
end