Class: EncodingChecker::Match
- Inherits:
-
Struct
- Object
- Struct
- EncodingChecker::Match
- Defined in:
- lib/encoding_checker.rb
Instance Attribute Summary collapse
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#invalid_lines ⇒ Object
Returns the value of attribute invalid_lines.
Instance Method Summary collapse
Instance Attribute Details
#encoding ⇒ Object
Returns the value of attribute encoding
38 39 40 |
# File 'lib/encoding_checker.rb', line 38 def encoding @encoding end |
#invalid_lines ⇒ Object
Returns the value of attribute invalid_lines
38 39 40 |
# File 'lib/encoding_checker.rb', line 38 def invalid_lines @invalid_lines end |
Instance Method Details
#empty? ⇒ Boolean
39 40 41 |
# File 'lib/encoding_checker.rb', line 39 def empty? invalid_lines.empty? end |
#to_s ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/encoding_checker.rb', line 43 def to_s invalid_lines.map { |line| result = %(#{encoding.to_s.upcase} error on line #{line}"\n) result << 'Invalid characters: ' << line.invalid_characters.join(', ') << "\n" result }.join("\n") end |