Module: Tins::LinesFile::LineExtension
- Defined in:
- lib/tins/lines_file.rb
Overview
Extension module that adds line metadata to individual lines.
This module is automatically mixed into each line when a LinesFile is created, providing access to line number and filename information directly from the line objects.
Instance Attribute Summary collapse
-
#line_number ⇒ Integer
readonly
The line number (1-based) of this line.
Instance Method Summary collapse
-
#filename ⇒ String
The filename associated with this line’s source.
Instance Attribute Details
#line_number ⇒ Integer (readonly)
Returns The line number (1-based) of this line.
29 30 31 |
# File 'lib/tins/lines_file.rb', line 29 def line_number @line_number end |
Instance Method Details
#filename ⇒ String
Returns The filename associated with this line’s source.
32 33 34 |
# File 'lib/tins/lines_file.rb', line 32 def filename lines_file.filename.dup end |