Class: PatientZero::Monitoring::Twitter
- Inherits:
-
Object
- Object
- PatientZero::Monitoring::Twitter
- Includes:
- Client
- Defined in:
- lib/patient_zero/monitoring/twitter.rb
Constant Summary collapse
- VALID_DAYS =
[1,7,30]
Instance Attribute Summary collapse
-
#days ⇒ Object
readonly
Returns the value of attribute days.
-
#profile_id ⇒ Object
readonly
Returns the value of attribute profile_id.
Instance Method Summary collapse
-
#initialize(profile_id:, days: nil) ⇒ Twitter
constructor
A new instance of Twitter.
- #top_cities ⇒ Object
Methods included from Client
#connection, #get, included, #parse, #post, #put
Constructor Details
#initialize(profile_id:, days: nil) ⇒ Twitter
Returns a new instance of Twitter.
9 10 11 12 |
# File 'lib/patient_zero/monitoring/twitter.rb', line 9 def initialize profile_id:, days: nil @profile_id = profile_id @days = set_to_valid_days days end |
Instance Attribute Details
#days ⇒ Object (readonly)
Returns the value of attribute days.
7 8 9 |
# File 'lib/patient_zero/monitoring/twitter.rb', line 7 def days @days end |
#profile_id ⇒ Object (readonly)
Returns the value of attribute profile_id.
7 8 9 |
# File 'lib/patient_zero/monitoring/twitter.rb', line 7 def profile_id @profile_id end |
Instance Method Details
#top_cities ⇒ Object
14 15 16 |
# File 'lib/patient_zero/monitoring/twitter.rb', line 14 def top_cities statistical_data['top_cities'] end |