Class: FbGraph::Insight
- Includes:
- Comparison
- Defined in:
- lib/fb_graph/insight.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#period ⇒ Object
Returns the value of attribute period.
-
#values ⇒ Object
Returns the value of attribute values.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ Insight
constructor
A new instance of Insight.
Methods included from Comparison
Methods inherited from Node
#connection, #destroy, fetch, #fetch
Constructor Details
#initialize(identifier, attributes = {}) ⇒ Insight
Returns a new instance of Insight.
7 8 9 10 11 12 13 |
# File 'lib/fb_graph/insight.rb', line 7 def initialize(identifier, attributes = {}) super @name = attributes[:name] @period = attributes[:period] @values = attributes[:values].collect(&:with_indifferent_access) @description = attributes[:description] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/fb_graph/insight.rb', line 5 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/fb_graph/insight.rb', line 5 def name @name end |
#period ⇒ Object
Returns the value of attribute period.
5 6 7 |
# File 'lib/fb_graph/insight.rb', line 5 def period @period end |
#values ⇒ Object
Returns the value of attribute values.
5 6 7 |
# File 'lib/fb_graph/insight.rb', line 5 def values @values end |