class PatientZero::Analytics::Twitter

Public Instance Methods

engagements() click to toggle source
# File lib/patient_zero/analytics/twitter.rb, line 8
def engagements
  @engagements ||= messages.reduce(0) { |sum, message| sum + message.engagements }
end
followers() click to toggle source
# File lib/patient_zero/analytics/twitter.rb, line 16
def followers
  analytical_data['followers'].to_i
end
impressions() click to toggle source
# File lib/patient_zero/analytics/twitter.rb, line 4
def impressions
  analytical_data['total_impressions'].to_i
end
impressions_by_city() click to toggle source
# File lib/patient_zero/analytics/twitter.rb, line 24
def impressions_by_city
  {}
end
likes() click to toggle source
# File lib/patient_zero/analytics/twitter.rb, line 20
def likes
  analytical_data['total_favorites'].to_i
end
reach() click to toggle source
# File lib/patient_zero/analytics/twitter.rb, line 12
def reach
  @reach ||= (0.12 * analytical_data['followers'].to_i).round
end
total_comments() click to toggle source
# File lib/patient_zero/analytics/twitter.rb, line 28
def total_comments
  nil
end