Sha256: dc53f8cc4b0c5eef96e74de4a6afe6b314e3ca9b720743b4c8572b6353270469

Contents?: true

Size: 495 Bytes

Versions: 3

Compression:

Stored size: 495 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.13.0 lib/quandl/client/models/scraper.rb
quandl_client-2.12.0 lib/quandl/client/models/scraper.rb
quandl_client-2.11.0 lib/quandl/client/models/scraper.rb