Class: Lintress::Offense
- Inherits:
-
Object
- Object
- Lintress::Offense
- Defined in:
- lib/lintress/parser.rb
Instance Attribute Summary collapse
-
#ocolumn ⇒ Object
Returns the value of attribute ocolumn.
-
#ofile ⇒ Object
Returns the value of attribute ofile.
-
#oline ⇒ Object
Returns the value of attribute oline.
-
#oreason ⇒ Object
Returns the value of attribute oreason.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Offense
constructor
A new instance of Offense.
- #to_s ⇒ Object
Constructor Details
#initialize(opts) ⇒ Offense
Returns a new instance of Offense.
35 36 37 38 39 40 |
# File 'lib/lintress/parser.rb', line 35 def initialize opts @ofile = opts[:file] @oline = opts[:line] @ocolumn = opts[:col] @oreason = opts[:reason] end |
Instance Attribute Details
#ocolumn ⇒ Object
Returns the value of attribute ocolumn.
33 34 35 |
# File 'lib/lintress/parser.rb', line 33 def ocolumn @ocolumn end |
#ofile ⇒ Object
Returns the value of attribute ofile.
33 34 35 |
# File 'lib/lintress/parser.rb', line 33 def ofile @ofile end |
#oline ⇒ Object
Returns the value of attribute oline.
33 34 35 |
# File 'lib/lintress/parser.rb', line 33 def oline @oline end |
#oreason ⇒ Object
Returns the value of attribute oreason.
33 34 35 |
# File 'lib/lintress/parser.rb', line 33 def oreason @oreason end |
Instance Method Details
#to_s ⇒ Object
42 43 44 |
# File 'lib/lintress/parser.rb', line 42 def to_s "#{ofile} at (#{oline}, #{ocolumn}) - #{oreason}" end |