Sha256: 04a8742342e0e674d54d6d0f3c85028c4156bbf8b67622918dd4946899f84ed5

Contents?: true

Size: 1.15 KB

Versions: 24

Compression:

Stored size: 1.15 KB

Contents

# Parses the GetQualificationType Response

module RTurk
  class GetQualificationTypeResponse < Response
    attr_reader :qualification_type_id, :creation_time, :name, :description,
                :keywords, :status, :retry_delay_in_seconds, :is_requestable,
                :test, :test_duration_in_seconds, :answer_key, :auto_granted,
                :auto_granted_value

    def initialize(response)
      @raw_xml = response.body
      @xml = Nokogiri::XML(@raw_xml)
      raise_errors
      map_content(@xml.xpath('//QualificationType'),
        :qualification_type_id => 'QualificationTypeId',
        :creation_time => 'CreationTime',
        :name => 'Name',
        :description => 'Description',
        :keywords => 'Keywords',
        :status => 'QualificationTypeStatus',
        :retry_delay_in_seconds => 'RetryDelayInSeconds',
        :is_requestable => 'IsRequestable',
        :test => 'Test',
        :test_duration_in_seconds => 'TestDurationInSeconds',
        :answer_key => 'AnswerKey',
        :auto_granted => 'AutoGranted',
        :auto_granted_value => 'AutoGrantedValue'
      )

      @keywords = @keywords.split(', ') if @keywords
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rturk-2.12.1 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.12.0 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.11.3 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.11.2 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.11.1 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.11.0 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.10.3 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.10.2 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.10.1 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.10.0 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.9.0 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.8.0 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.7.0 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.6.0 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.5.2 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.5.0 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.4.1 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.4.0 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.3.6 lib/rturk/parsers/responses/get_qualification_type_response.rb
rturk-2.3.5 lib/rturk/parsers/responses/get_qualification_type_response.rb