Skip to content

Instantly share code, notes, and snippets.

answer.response.each |response_item|
answer.table.columns.map |col|
response_item[col.field.to_sym]
end
end
require 'prime'
class Primer < Prime::EratosthenesSieve
def self.call(limit)
new.call(limit)
end
def call(limit)
(1..limit).to_a.inject([]) do |arr, n|
arr << get_nth_prime(n)