Class: Csvlint::WrappedIO
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Csvlint::WrappedIO
- Defined in:
- lib/csvlint/wrapped_io.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
3 4 5 |
# File 'lib/csvlint/wrapped_io.rb', line 3 def line @line end |
Instance Method Details
#gets(*args) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/csvlint/wrapped_io.rb', line 9 def gets(*args) if args.size == 1 && args[0].is_a?(String) s = __getobj__.gets(args[0]) if s @line << s end s else __getobj__.gets(*args) end end |
#reset_line ⇒ Object
5 6 7 |
# File 'lib/csvlint/wrapped_io.rb', line 5 def reset_line @line = '' end |