Class: Rookout::Augs::Locations::LocationFileLine
- Defined in:
- lib/rookout/augs/locations/location_file_line.rb
Constant Summary collapse
- NAME =
"file_line".freeze
Instance Attribute Summary collapse
-
#file_hash ⇒ Object
readonly
Returns the value of attribute file_hash.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#line_crc ⇒ Object
readonly
Returns the value of attribute line_crc.
-
#line_unique ⇒ Object
readonly
Returns the value of attribute line_unique.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
Instance Method Summary collapse
- #add_aug(trigger_services) ⇒ Object
-
#initialize(arguments, output, aug) ⇒ LocationFileLine
constructor
A new instance of LocationFileLine.
Methods inherited from Location
#execute, #id, #notify_active, #notify_error, #notify_pending, #notify_removed, #notify_warning
Constructor Details
#initialize(arguments, output, aug) ⇒ LocationFileLine
Returns a new instance of LocationFileLine.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rookout/augs/locations/location_file_line.rb', line 13 def initialize arguments, output, aug super output, aug @filename = arguments["filename"] @lineno = arguments["lineno"] # NOTE: Hashes are only used for suggestions, not for verification @file_hash = arguments["sha256"] @line_crc = arguments["line_crc32_2"] @line_unique = arguments["line_unique"] || false end |
Instance Attribute Details
#file_hash ⇒ Object (readonly)
Returns the value of attribute file_hash.
26 27 28 |
# File 'lib/rookout/augs/locations/location_file_line.rb', line 26 def file_hash @file_hash end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
24 25 26 |
# File 'lib/rookout/augs/locations/location_file_line.rb', line 24 def filename @filename end |
#line_crc ⇒ Object (readonly)
Returns the value of attribute line_crc.
27 28 29 |
# File 'lib/rookout/augs/locations/location_file_line.rb', line 27 def line_crc @line_crc end |
#line_unique ⇒ Object (readonly)
Returns the value of attribute line_unique.
28 29 30 |
# File 'lib/rookout/augs/locations/location_file_line.rb', line 28 def line_unique @line_unique end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
25 26 27 |
# File 'lib/rookout/augs/locations/location_file_line.rb', line 25 def lineno @lineno end |
Instance Method Details
#add_aug(trigger_services) ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/rookout/augs/locations/location_file_line.rb', line 30 def add_aug trigger_services trigger_services.get_service("position").add_aug self rescue SystemExit raise rescue Exception => e = "Exception when adding aug" Logger.instance.error , e notify_error Processor::RookError.new e, end |