Sha256: ad760896fefb32d38fffa862d1678d8eb2d1f74231e2dbb32ff329bf8c5406f8

Contents?: true

Size: 455 Bytes

Versions: 3

Compression:

Stored size: 455 Bytes

Contents

module Quandl
module Client

class Scraper < Quandl::Client::Base
  
  has_many :jobs
  
  attributes  :id, :name, :scraper, :scraper_url, :git_url, :git_reference, :created_at, :updated_at, 
              :type, :schedule_at, :schedule_run_time, :schedule_next
  
  validates :name, presence: true
  
  def scraper=(value)
    write_attribute(:scraper, Faraday::UploadIO.new(value, 'text/plain') )
  end

  def run_now
    jobs.create
  end

end

end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
quandl_client-2.10.2 lib/quandl/client/models/scraper.rb
quandl_client-2.10.1 lib/quandl/client/models/scraper.rb
quandl_client-2.10.0 lib/quandl/client/models/scraper.rb