lib/quandl/client/models/scraper.rb in quandl_client-2.10.2 vs lib/quandl/client/models/scraper.rb in quandl_client-2.11.0

- old
+ new

@@ -1,24 +1,21 @@ module Quandl -module Client + module Client + class Scraper < Quandl::Client::Base -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 + has_many :jobs - def run_now - jobs.create - end + attributes :id, :name, :scraper, :scraper_url, :git_url, :git_reference, :created_at, :updated_at, + :type, :schedule_at, :schedule_run_time, :schedule_next -end + validates :name, presence: true -end + def scraper=(value) + write_attribute(:scraper, Faraday::UploadIO.new(value, 'text/plain') ) + end + + def run_now + jobs.create + end + end + end end \ No newline at end of file