Class: Punchlist::Offense
- Inherits:
-
Object
- Object
- Punchlist::Offense
- Defined in:
- lib/punchlist/offense.rb
Overview
Represents a discovered punchlist item in code
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#line_num ⇒ Object
readonly
Returns the value of attribute line_num.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(filename, line_num, line) ⇒ Offense
constructor
A new instance of Offense.
Constructor Details
#initialize(filename, line_num, line) ⇒ Offense
Returns a new instance of Offense.
7 8 9 10 11 |
# File 'lib/punchlist/offense.rb', line 7 def initialize(filename, line_num, line) @filename = filename @line_num = line_num @line = line end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
6 7 8 |
# File 'lib/punchlist/offense.rb', line 6 def filename @filename end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
6 7 8 |
# File 'lib/punchlist/offense.rb', line 6 def line @line end |
#line_num ⇒ Object (readonly)
Returns the value of attribute line_num.
6 7 8 |
# File 'lib/punchlist/offense.rb', line 6 def line_num @line_num end |
Instance Method Details
#==(other) ⇒ Object
13 14 15 |
# File 'lib/punchlist/offense.rb', line 13 def ==(other) other.class == self.class && other.state == state end |