Class: RTurk::QualificationParser

Inherits:
Parser
  • Object
show all
Defined in:
lib/rturk/parsers/qualification_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XMLUtilities

#map_content, #normalize_nested_params, #xml_to_hash

Constructor Details

#initialize(qualifications_xml) ⇒ QualificationParser

Returns a new instance of QualificationParser



8
9
10
11
12
13
14
15
16
17
# File 'lib/rturk/parsers/qualification_parser.rb', line 8

def initialize(qualifications_xml)
  @xml_obj = qualifications_xml
  map_content(@xml_obj,
              :qualification_type_id => 'QualificationTypeId',
              :subject_id => 'SubjectId',
              :grant_time => 'GrantTime',
              :integer_value => 'IntegerValue',
              :locale_value => 'LocaleValue',
              :status => 'Status')
end

Instance Attribute Details

#grant_timeObject (readonly)

Returns the value of attribute grant_time



5
6
7
# File 'lib/rturk/parsers/qualification_parser.rb', line 5

def grant_time
  @grant_time
end

#integer_valueObject (readonly)

Returns the value of attribute integer_value



5
6
7
# File 'lib/rturk/parsers/qualification_parser.rb', line 5

def integer_value
  @integer_value
end

#locale_valueObject (readonly)

Returns the value of attribute locale_value



5
6
7
# File 'lib/rturk/parsers/qualification_parser.rb', line 5

def locale_value
  @locale_value
end

#qualification_type_idObject (readonly)

Returns the value of attribute qualification_type_id



5
6
7
# File 'lib/rturk/parsers/qualification_parser.rb', line 5

def qualification_type_id
  @qualification_type_id
end

#statusObject (readonly)

Returns the value of attribute status



5
6
7
# File 'lib/rturk/parsers/qualification_parser.rb', line 5

def status
  @status
end

#subject_idObject (readonly)

Returns the value of attribute subject_id



5
6
7
# File 'lib/rturk/parsers/qualification_parser.rb', line 5

def subject_id
  @subject_id
end