Class: DontComment::Offense
- Inherits:
-
Struct
- Object
- Struct
- DontComment::Offense
- Defined in:
- lib/dont_comment/offense.rb
Instance Attribute Summary collapse
-
#loc ⇒ Object
Returns the value of attribute loc.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#loc ⇒ Object
Returns the value of attribute loc
2 3 4 |
# File 'lib/dont_comment/offense.rb', line 2 def loc @loc end |
#path ⇒ Object
Returns the value of attribute path
2 3 4 |
# File 'lib/dont_comment/offense.rb', line 2 def path @path end |
Instance Method Details
#relative_path ⇒ Object
3 4 5 6 7 |
# File 'lib/dont_comment/offense.rb', line 3 def relative_path pwd = Pathname.pwd absolute_path = pwd.join(path) absolute_path.relative_path_from(pwd) end |