diff options
Diffstat (limited to 'lib/csv/core_ext/string.rb')
-rw-r--r-- | lib/csv/core_ext/string.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/csv/core_ext/string.rb b/lib/csv/core_ext/string.rb new file mode 100644 index 0000000000..8f2070f3bd --- /dev/null +++ b/lib/csv/core_ext/string.rb @@ -0,0 +1,9 @@ +class String # :nodoc: + # Equivalent to CSV::parse_line(self, options) + # + # "CSV,data".parse_csv + # #=> ["CSV", "data"] + def parse_csv(**options) + CSV.parse_line(self, options) + end +end |