Class: Problem
- Inherits:
-
Struct
- Object
- Struct
- Problem
- Defined in:
- lib/inspect/problem.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#line ⇒ Object
Returns the value of attribute line.
-
#message ⇒ Object
Returns the value of attribute message.
-
#severity ⇒ Object
Returns the value of attribute severity.
Class Method Summary collapse
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file
1 2 3 |
# File 'lib/inspect/problem.rb', line 1 def file @file end |
#line ⇒ Object
Returns the value of attribute line
1 2 3 |
# File 'lib/inspect/problem.rb', line 1 def line @line end |
#message ⇒ Object
Returns the value of attribute message
1 2 3 |
# File 'lib/inspect/problem.rb', line 1 def @message end |
#severity ⇒ Object
Returns the value of attribute severity
1 2 3 |
# File 'lib/inspect/problem.rb', line 1 def severity @severity end |
Class Method Details
.generate(node) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/inspect/problem.rb', line 3 def self.generate(node) Problem.new( node.get_elements('file').first.text.gsub('file://$PROJECT_DIR$/', ''), node.get_elements('line').first.text.to_i, node.get_elements('description').first.text, node.get_elements('problem_class').first.attributes['severity'] ) end |