Class: Sensu::Mutator
Constant Summary
collapse
- @@autorun =
This works just like Plugin::CLI's autorun.
self
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#api_request, #api_settings, #api_settings=, #cast_bool_values_int, #config_files, #deep_merge, #event, #event=, #load_config, #map_go_event_into_ruby, #net_http_req_class, #paginated_get, #read_event, #settings
Constructor Details
#initialize(argv = ARGV) ⇒ Mutator
46
47
48
49
|
# File 'lib/sensu-mutator.rb', line 46
def initialize(argv = ARGV)
super()
self.argv = parse_options(argv)
end
|
Instance Attribute Details
#argv ⇒ Object
Returns the value of attribute argv.
44
45
46
|
# File 'lib/sensu-mutator.rb', line 44
def argv
@argv
end
|
Class Method Details
.disable_autorun ⇒ Object
68
69
70
|
# File 'lib/sensu-mutator.rb', line 68
def self.disable_autorun
@@autorun = false
end
|
.method_added(name) ⇒ Object
63
64
65
|
# File 'lib/sensu-mutator.rb', line 63
def method_added(name)
@@autorun = self if name == :mutate
end
|
Instance Method Details
#dump ⇒ Object
56
57
58
|
# File 'lib/sensu-mutator.rb', line 56
def dump
puts JSON.dump(@event)
end
|
#mutate ⇒ Object
51
52
53
54
|
# File 'lib/sensu-mutator.rb', line 51
def mutate
nil
end
|