class Sensu::Mutator

Attributes

argv[RW]

Public Class Methods

disable_autorun() click to toggle source
# File lib/sensu-plugins-json-mutator/mutator.rb, line 36
def self.disable_autorun
  @@autorun = false
end
method_added(name) click to toggle source
# File lib/sensu-plugins-json-mutator/mutator.rb, line 29
def method_added(name)
  if name == :mutate
    @@autorun = self
  end
end
new(argv = ARGV) click to toggle source
Calls superclass method
# File lib/sensu-plugins-json-mutator/mutator.rb, line 12
def initialize(argv = ARGV)
  super()
  self.argv = parse_options(argv)
end

Public Instance Methods

dump() click to toggle source
# File lib/sensu-plugins-json-mutator/mutator.rb, line 22
def dump
  puts JSON.dump(@event)
end
mutate() click to toggle source
# File lib/sensu-plugins-json-mutator/mutator.rb, line 17
def mutate
  ## Override this, be sure any changes are made to @event
  nil
end