Method: Runkeeper::Activity#optional_attrs

Defined in:
lib/runkeeper/activity.rb

#optional_attrsObject



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/runkeeper/activity.rb', line 36

def optional_attrs
  h = {}
  [
    :total_distance,
    :average_heart_rate,
    :total_calories,
    :notes,
    :path,
    :post_to_facebook,
    :post_to_twitter
  ].each do |method_name|
    v = send(method_name)
    h[method_name] = v if v
  end
  h
end