Class: PatientZero::Message::Twitter

Inherits:
Base
  • Object
show all
Defined in:
lib/patient_zero/message/twitter.rb

Instance Attribute Summary

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PatientZero::Message::Base

Instance Method Details

#clicksObject



16
17
18
# File 'lib/patient_zero/message/twitter.rb', line 16

def clicks
  data.fetch 'clicks'
end

#engagementsObject



4
5
6
# File 'lib/patient_zero/message/twitter.rb', line 4

def engagements
  @engagements ||= retweets + favorites + clicks
end

#favoritesObject



12
13
14
# File 'lib/patient_zero/message/twitter.rb', line 12

def favorites
  data.fetch 'favorites'
end

#retweetsObject



8
9
10
# File 'lib/patient_zero/message/twitter.rb', line 8

def retweets
  data.fetch 'retweets'
end