Sha256: bf3429484faccbc83e34e0915834be74a2b9c1f053dea95d1e28ea24bc66c15b

Contents?: true

Size: 329 Bytes

Versions: 7

Compression:

Stored size: 329 Bytes

Contents

module Toro
  class Client
    class << self
      def create_job(item)
        item.stringify_keys!
        job_attributes = item_to_job_attributes(item)
        Job.create!(job_attributes)
      end

      private

      def item_to_job_attributes(item)
        { 'status' => 'queued' }.merge(item)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
toro-0.2.2 lib/toro/client.rb
toro-0.2.1 lib/toro/client.rb
toro-0.2.0 lib/toro/client.rb
toro-0.1.1 lib/toro/client.rb
toro-0.1.0 lib/toro/client.rb
toro-0.0.3 lib/toro/client.rb
toro-0.0.2 lib/toro/client.rb