Class: ConcreteIssue
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ConcreteIssue
- Defined in:
- app/models/concrete_issue.rb
Overview
An expression of an Issue in a particular FindingAidVersion on a particular Run.
Instance Attribute Summary (collapse)
- - (DateTime) created_at
- - (Text) diagnostic_info
- - (Integer) line_number
- - (Text) location
- - (DateTime) updated_at
Belongs to (collapse)
Instance Method Summary (collapse)
-
- (Hash) generate_tags_from_diagnostic_info
Process the raw into a hash suitable for JSON storage.
Instance Attribute Details
- (DateTime) created_at
25 |
# File 'db/schema.rb', line 25 t.datetime "created_at" |
- (Text) diagnostic_info
24 |
# File 'db/schema.rb', line 24 t.text "diagnostic_info", default: "", null: false |
- (Integer) line_number
23 |
# File 'db/schema.rb', line 23 t.integer "line_number", null: false |
- (Text) location
22 |
# File 'db/schema.rb', line 22 t.text "location", null: false |
- (DateTime) updated_at
26 |
# File 'db/schema.rb', line 26 t.datetime "updated_at" |
Instance Method Details
- (FindingAidVersion) finding_aid_version
5 |
# File 'app/models/concrete_issue.rb', line 5 belongs_to :finding_aid_version |
- (Hash) generate_tags_from_diagnostic_info
Process the raw <diagnostic_info> into a hash suitable for JSON storage
12 13 14 15 16 17 18 19 |
# File 'app/models/concrete_issue.rb', line 12 def self. = diagnostic_info .split("\n") .map {|s| s.match(/([^\s:]+): (.+)/)} .reject(&:blank?) .map {|m| m[1..2]} .to_h end |