Class: ReadabilityImporter::Loader::InstapaperCsvLoader
- Defined in:
- lib/readability_importer/loader.rb
Constant Summary collapse
- NON_ASCII_REGEXP =
/[^\x00-\x7f]/u
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ InstapaperCsvLoader
constructor
A new instance of InstapaperCsvLoader.
- #load ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(path) ⇒ InstapaperCsvLoader
Returns a new instance of InstapaperCsvLoader.
61 62 63 |
# File 'lib/readability_importer/loader.rb', line 61 def initialize(path) @path = path end |
Class Method Details
.desc ⇒ Object
57 58 59 |
# File 'lib/readability_importer/loader.rb', line 57 def self.desc "Path to CSV file" end |
Instance Method Details
#load ⇒ Object
65 66 67 68 69 |
# File 'lib/readability_importer/loader.rb', line 65 def load CSV.read(@path).map do |line| URI.escape(line[0], NON_ASCII_REGEXP) end.reverse end |