Class: FbGraph::Note
- Includes:
- Connections::Comments
- Defined in:
- lib/fb_graph/note.rb
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.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#updated_time ⇒ Object
Returns the value of attribute updated_time.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Instance Method Summary collapse
-
#initialize(identifier, options = {}) ⇒ Note
constructor
A new instance of Note.
Methods included from Connections::Comments
Methods inherited from Node
Methods included from Comparison
Constructor Details
#initialize(identifier, options = {}) ⇒ Note
Returns a new instance of Note.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/fb_graph/note.rb', line 7 def initialize(identifier, = {}) super if (from = [:from]) @from = if from[:category] FbGraph::Page.new(from.delete(:id), from) else FbGraph::User.new(from.delete(:id), from) end end @subject = [:subject] @message = [:message] if [:created_time] @created_time = Time.parse([:created_time]).utc end if [:updated_time] @updated_time = Time.parse([:updated_time]).utc end end |
Instance Attribute Details
#created_time ⇒ Object
Returns the value of attribute created_time.
5 6 7 |
# File 'lib/fb_graph/note.rb', line 5 def created_time @created_time end |
#from ⇒ Object
Returns the value of attribute from.
5 6 7 |
# File 'lib/fb_graph/note.rb', line 5 def from @from end |
#message ⇒ Object
Returns the value of attribute message.
5 6 7 |
# File 'lib/fb_graph/note.rb', line 5 def @message end |
#subject ⇒ Object
Returns the value of attribute subject.
5 6 7 |
# File 'lib/fb_graph/note.rb', line 5 def subject @subject end |
#updated_time ⇒ Object
Returns the value of attribute updated_time.
5 6 7 |
# File 'lib/fb_graph/note.rb', line 5 def updated_time @updated_time end |