Class: Rookout::Augs::Locations::Location
- Inherits:
-
Object
- Object
- Rookout::Augs::Locations::Location
show all
- Defined in:
- lib/rookout/augs/locations/location.rb
Instance Method Summary
collapse
Constructor Details
#initialize(output, aug) ⇒ Location
Returns a new instance of Location.
9
10
11
12
13
|
# File 'lib/rookout/augs/locations/location.rb', line 9
def initialize output, aug
@output = output
@aug = aug
@log_cache = []
end
|
Instance Method Details
#add_aug(_trigger_services) ⇒ Object
15
16
17
|
# File 'lib/rookout/augs/locations/location.rb', line 15
def add_aug _trigger_services
raise NotImplementedError
end
|
#execute(frame_binding, stack_trace, extracted) ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/rookout/augs/locations/location.rb', line 23
def execute frame_binding, stack_trace,
UserWarnings.with self do
begin
@aug.execute frame_binding, stack_trace, , @output
rescue SystemExit
raise
rescue Exception => e
message = "Exception while processing Aug"
error = Processor::RookError.new e, message
notify_warning error
end
end
end
|
#id ⇒ Object
19
20
21
|
# File 'lib/rookout/augs/locations/location.rb', line 19
def id
@aug.id
end
|
#notify_active ⇒ Object
37
38
39
|
# File 'lib/rookout/augs/locations/location.rb', line 37
def notify_active
send_rule_status :Active
end
|
#notify_error(error) ⇒ Object
49
50
51
|
# File 'lib/rookout/augs/locations/location.rb', line 49
def notify_error error
send_rule_status :Error, error
end
|
#notify_pending ⇒ Object
41
42
43
|
# File 'lib/rookout/augs/locations/location.rb', line 41
def notify_pending
send_rule_status :Pending
end
|
#notify_removed ⇒ Object
45
46
47
|
# File 'lib/rookout/augs/locations/location.rb', line 45
def notify_removed
send_rule_status :Deleted
end
|
#notify_warning(error) ⇒ Object
53
54
55
56
57
58
59
60
61
|
# File 'lib/rookout/augs/locations/location.rb', line 53
def notify_warning error
return if silence_log? error
Logger.instance.warning error.message, error.exception
return if @output.nil?
@output.send_rule_status id, :Warning, error
end
|