Method: Datasets::AFINN#each
- Defined in:
- lib/datasets/afinn.rb
#each ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/datasets/afinn.rb', line 27 def each return to_enum(__method__) unless block_given? extract_file("AFINN/AFINN-111.txt") do |input| csv = CSV.new(input, col_sep: "\t", converters: :numeric) csv.each do |row| yield(Record.new(*row)) end end end |