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

- (QualificationParser) initialize(qualifications_xml)



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

- (Object) grant_time (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

- (Object) integer_value (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

- (Object) locale_value (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

- (Object) qualification_type_id (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

- (Object) status (readonly)

Returns the value of attribute status



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

def status
  @status
end

- (Object) subject_id (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