Class: ReadabilityImporter::Loader::InstapaperCsvLoader

Inherits:
Base
  • Object
show all
Defined in:
lib/readability_importer/loader.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

type

Constructor Details

#initialize(path) ⇒ InstapaperCsvLoader

Returns a new instance of InstapaperCsvLoader.



58
59
60
# File 'lib/readability_importer/loader.rb', line 58

def initialize(path)
  @path = path
end

Class Method Details

.descObject



54
55
56
# File 'lib/readability_importer/loader.rb', line 54

def self.desc
  "Path to CSV file"
end

Instance Method Details

#loadObject



62
63
64
65
66
# File 'lib/readability_importer/loader.rb', line 62

def load
  CSV.read(@path).map do |line|
    line[0]
  end.reverse
end