Class: FacebookTopics::Insights
- Inherits:
-
Object
- Object
- FacebookTopics::Insights
- Defined in:
- lib/facebook_topics/results/insight.rb
Instance Attribute Summary collapse
-
#breakdown ⇒ Object
Returns the value of attribute breakdown.
-
#volume ⇒ Object
Returns the value of attribute volume.
Instance Method Summary collapse
-
#initialize(results = []) ⇒ Insights
constructor
A new instance of Insights.
Constructor Details
#initialize(results = []) ⇒ Insights
Returns a new instance of Insights.
5 6 7 8 |
# File 'lib/facebook_topics/results/insight.rb', line 5 def initialize(results = []) @volume = results["data"].first["mentions"]["data"].shift["count"].to_i @breakdown = results["data"].first["mentions"]["data"] end |
Instance Attribute Details
#breakdown ⇒ Object
Returns the value of attribute breakdown.
3 4 5 |
# File 'lib/facebook_topics/results/insight.rb', line 3 def breakdown @breakdown end |
#volume ⇒ Object
Returns the value of attribute volume.
3 4 5 |
# File 'lib/facebook_topics/results/insight.rb', line 3 def volume @volume end |