Class: LineDetector::Report
- Inherits:
-
Object
- Object
- LineDetector::Report
- Defined in:
- lib/line-detector.rb
Instance Attribute Summary collapse
-
#final_eol ⇒ Object
Returns the value of attribute final_eol.
-
#line_ending ⇒ Object
Returns the value of attribute line_ending.
Instance Method Summary collapse
-
#initialize(line_ending, final_eol) ⇒ Report
constructor
A new instance of Report.
- #to_s ⇒ Object
Constructor Details
#initialize(line_ending, final_eol) ⇒ Report
Returns a new instance of Report.
108 109 110 111 |
# File 'lib/line-detector.rb', line 108 def initialize(line_ending, final_eol) @line_ending = line_ending @final_eol = final_eol end |
Instance Attribute Details
#final_eol ⇒ Object
Returns the value of attribute final_eol.
106 107 108 |
# File 'lib/line-detector.rb', line 106 def final_eol @final_eol end |
#line_ending ⇒ Object
Returns the value of attribute line_ending.
106 107 108 |
# File 'lib/line-detector.rb', line 106 def line_ending @line_ending end |
Instance Method Details
#to_s ⇒ Object
113 114 115 116 117 118 119 120 121 122 |
# File 'lib/line-detector.rb', line 113 def to_s final_eol_piece = if @final_eol ', with final eol' else ', without final eol' end "#{@line_ending.to_s}#{final_eol_piece}" end |