Sha256: 67b7b2863b99d3c965eb0e540b6e4902024ee2a3f6f45bb741edf20b31f294f7

Contents?: true

Size: 672 Bytes

Versions: 1

Compression:

Stored size: 672 Bytes

Contents

module RTurk
  class RTurk::ExtendHIT < RTurk::Operation
    
    attr_accessor :hit_id, :max_assignments_increment, :expiration_increment_in_seconds 
    require_params :hit_id

    def to_params
      if max_assignments_increment.nil? && expiration_increment_in_seconds.nil?
        raise MissingParameters, 'Must add to either the HIT assignment count or expiration time.'
      end
      
      {'HITId' => self.hit_id,
       'MaxAssignmentsIncrement' => self.max_assignments_increment,
       'ExpirationIncrementInSeconds' => self.expiration_increment_in_seconds}
    end

  end

  def self.ExtendHIT(*args, &blk)
    RTurk::ExtendHIT.create(*args, &blk)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rturk-2.1.1 lib/rturk/operations/extend_hit.rb