Class: FbGraph::Review
Instance Attribute Summary collapse
-
#created_time ⇒ Object
Returns the value of attribute created_time.
-
#from ⇒ Object
Returns the value of attribute from.
-
#message ⇒ Object
Returns the value of attribute message.
-
#rating ⇒ Object
Returns the value of attribute rating.
-
#to ⇒ Object
Returns the value of attribute to.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ Review
constructor
A new instance of Review.
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ Review
Returns a new instance of Review.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fb_graph/review.rb', line 5 def initialize(identifier, attributes = {}) super @from = if (from = attributes[:from]) User.new from[:id], from end @to = if (to = attributes[:to]) Application.new to[:id], to end @message = attributes[:message] @rating = attributes[:rating] if attributes[:created_time] @created_time = Time.parse(attributes[:created_time]).utc end end |
Instance Attribute Details
#created_time ⇒ Object
Returns the value of attribute created_time.
3 4 5 |
# File 'lib/fb_graph/review.rb', line 3 def created_time @created_time end |
#from ⇒ Object
Returns the value of attribute from.
3 4 5 |
# File 'lib/fb_graph/review.rb', line 3 def from @from end |
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/fb_graph/review.rb', line 3 def @message end |
#rating ⇒ Object
Returns the value of attribute rating.
3 4 5 |
# File 'lib/fb_graph/review.rb', line 3 def @rating end |
#to ⇒ Object
Returns the value of attribute to.
3 4 5 |
# File 'lib/fb_graph/review.rb', line 3 def to @to end |