Class: Ruby::Reforge::Issue
- Inherits:
-
Object
- Object
- Ruby::Reforge::Issue
- Defined in:
- lib/ruby/reforge/scanner.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#new_code ⇒ Object
readonly
Returns the value of attribute new_code.
-
#old_code ⇒ Object
readonly
Returns the value of attribute old_code.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, file:, line:, message:, old_code: nil, new_code: nil) ⇒ Issue
constructor
A new instance of Issue.
- #severity ⇒ Object
Constructor Details
#initialize(type:, file:, line:, message:, old_code: nil, new_code: nil) ⇒ Issue
Returns a new instance of Issue.
156 157 158 159 160 161 162 163 |
# File 'lib/ruby/reforge/scanner.rb', line 156 def initialize(type:, file:, line:, message:, old_code: nil, new_code: nil) @type = type @file = file @line = line @message = @old_code = old_code @new_code = new_code end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
154 155 156 |
# File 'lib/ruby/reforge/scanner.rb', line 154 def file @file end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
154 155 156 |
# File 'lib/ruby/reforge/scanner.rb', line 154 def line @line end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
154 155 156 |
# File 'lib/ruby/reforge/scanner.rb', line 154 def @message end |
#new_code ⇒ Object (readonly)
Returns the value of attribute new_code.
154 155 156 |
# File 'lib/ruby/reforge/scanner.rb', line 154 def new_code @new_code end |
#old_code ⇒ Object (readonly)
Returns the value of attribute old_code.
154 155 156 |
# File 'lib/ruby/reforge/scanner.rb', line 154 def old_code @old_code end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
154 155 156 |
# File 'lib/ruby/reforge/scanner.rb', line 154 def type @type end |
Instance Method Details
#severity ⇒ Object
165 166 167 168 169 170 171 172 173 174 |
# File 'lib/ruby/reforge/scanner.rb', line 165 def severity case @type when :deprecated_method, :deprecated_pattern :warning when :breaking_change :error else :info end end |