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.
99 100 101 102 |
# File 'lib/line-detector.rb', line 99 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.
97 98 99 |
# File 'lib/line-detector.rb', line 97 def final_eol @final_eol end |
#line_ending ⇒ Object
Returns the value of attribute line_ending.
97 98 99 |
# File 'lib/line-detector.rb', line 97 def line_ending @line_ending end |
Instance Method Details
#to_s ⇒ Object
104 105 106 107 108 109 110 111 112 113 |
# File 'lib/line-detector.rb', line 104 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 |