Class: Ohmage::SurveyResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/ohmage/entity/survey.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ SurveyResponse

Returns a new instance of SurveyResponse.



14
15
16
17
18
19
# File 'lib/ohmage/entity/survey.rb', line 14

def initialize(attrs = {})
  @urn = attrs.keys[0].to_s
  attrs.values[0].each do |k, v|
    instance_variable_set("@#{k}", v)
  end
end

Instance Attribute Details

#clientString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/ohmage/entity/survey.rb', line 4

def client
  @client
end

#latitudeLong (readonly)

Returns:

  • (Long)


8
9
10
# File 'lib/ohmage/entity/survey.rb', line 8

def latitude
  @latitude
end

#launch_context_longHash (readonly)

Returns:

  • (Hash)


10
11
12
# File 'lib/ohmage/entity/survey.rb', line 10

def launch_context_long
  @launch_context_long
end

#launch_context_shortHash (readonly)

Returns:

  • (Hash)


10
11
12
# File 'lib/ohmage/entity/survey.rb', line 10

def launch_context_short
  @launch_context_short
end

#location_accuracyString (readonly)

Returns location stuffz.

Returns:

  • (String)

    location stuffz



6
7
8
# File 'lib/ohmage/entity/survey.rb', line 6

def location_accuracy
  @location_accuracy
end

#location_providerString (readonly)

Returns location stuffz.

Returns:

  • (String)

    location stuffz



6
7
8
# File 'lib/ohmage/entity/survey.rb', line 6

def location_provider
  @location_provider
end

#location_statusString (readonly)

Returns location stuffz.

Returns:

  • (String)

    location stuffz



6
7
8
# File 'lib/ohmage/entity/survey.rb', line 6

def location_status
  @location_status
end

#location_timestampString (readonly)

Returns location stuffz.

Returns:

  • (String)

    location stuffz



6
7
8
# File 'lib/ohmage/entity/survey.rb', line 6

def location_timestamp
  @location_timestamp
end

#longitudeLong (readonly)

Returns:

  • (Long)


8
9
10
# File 'lib/ohmage/entity/survey.rb', line 8

def longitude
  @longitude
end

#privacy_stateString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/ohmage/entity/survey.rb', line 4

def privacy_state
  @privacy_state
end

#repeatable_set_idString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/ohmage/entity/survey.rb', line 4

def repeatable_set_id
  @repeatable_set_id
end

#repeatable_set_iterationString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/ohmage/entity/survey.rb', line 4

def repeatable_set_iteration
  @repeatable_set_iteration
end

#responsesHash (readonly)

Returns:

  • (Hash)


10
11
12
# File 'lib/ohmage/entity/survey.rb', line 10

def responses
  @responses
end

#survey_descriptionString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/ohmage/entity/survey.rb', line 4

def survey_description
  @survey_description
end

#survey_idString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/ohmage/entity/survey.rb', line 4

def survey_id
  @survey_id
end

#survey_titleString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/ohmage/entity/survey.rb', line 4

def survey_title
  @survey_title
end

#timeSomething Else (readonly)

Returns:

  • (Something Else)


12
13
14
# File 'lib/ohmage/entity/survey.rb', line 12

def time
  @time
end

#timezoneString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/ohmage/entity/survey.rb', line 4

def timezone
  @timezone
end

#userString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/ohmage/entity/survey.rb', line 4

def user
  @user
end

#utc_timestampSomething Else (readonly)

Returns:

  • (Something Else)


12
13
14
# File 'lib/ohmage/entity/survey.rb', line 12

def utc_timestamp
  @utc_timestamp
end