Class: FbGraph::Video
- Inherits:
-
Node
- Object
- Node
- FbGraph::Video
- Includes:
- Connections::Comments, Connections::Likes, Connections::Likes::Likable, Connections::Picture
- Defined in:
- lib/fb_graph/video.rb
Instance Attribute Summary (collapse)
-
- (Object) created_time
Returns the value of attribute created_time.
-
- (Object) description
Returns the value of attribute description.
-
- (Object) embed_html
Returns the value of attribute embed_html.
-
- (Object) from
Returns the value of attribute from.
-
- (Object) icon
Returns the value of attribute icon.
-
- (Object) name
Returns the value of attribute name.
-
- (Object) source
Returns the value of attribute source.
-
- (Object) tags
Returns the value of attribute tags.
-
- (Object) updated_time
Returns the value of attribute updated_time.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
Instance Method Summary (collapse)
-
- (Video) initialize(identifier, attributes = {})
constructor
A new instance of Video.
Methods included from Connections::Picture
Methods included from Connections::Likes::Likable
Methods included from Connections::Likes
Methods included from Connections::Comments
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
- (Video) initialize(identifier, attributes = {})
A new instance of Video
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/fb_graph/video.rb', line 10 def initialize(identifier, attributes = {}) super if (from = attributes[:from]) @from = if from[:category] Page.new(from[:id], from) else User.new(from[:id], from) end end @tags = [] if attributes[:tags] Collection.new(attributes[:tags]).each do |tag| @tags << Tag.new(tag) end end @name = attributes[:name] @description = attributes[:description] @embed_html = attributes[:embed_html] @icon = attributes[:icon] @source = attributes[:source] if attributes[:created_time] @created_time = Time.parse(attributes[:created_time]).utc end if attributes[:updated_time] @updated_time = Time.parse(attributes[:updated_time]).utc end # cached connection cache_collections attributes, :comments end |
Instance Attribute Details
- (Object) created_time
Returns the value of attribute created_time
8 9 10 |
# File 'lib/fb_graph/video.rb', line 8 def created_time @created_time end |
- (Object) description
Returns the value of attribute description
8 9 10 |
# File 'lib/fb_graph/video.rb', line 8 def description @description end |
- (Object) embed_html
Returns the value of attribute embed_html
8 9 10 |
# File 'lib/fb_graph/video.rb', line 8 def @embed_html end |
- (Object) from
Returns the value of attribute from
8 9 10 |
# File 'lib/fb_graph/video.rb', line 8 def from @from end |
- (Object) icon
Returns the value of attribute icon
8 9 10 |
# File 'lib/fb_graph/video.rb', line 8 def icon @icon end |
- (Object) name
Returns the value of attribute name
8 9 10 |
# File 'lib/fb_graph/video.rb', line 8 def name @name end |
- (Object) source
Returns the value of attribute source
8 9 10 |
# File 'lib/fb_graph/video.rb', line 8 def source @source end |
- (Object) tags
Returns the value of attribute tags
8 9 10 |
# File 'lib/fb_graph/video.rb', line 8 def @tags end |
- (Object) updated_time
Returns the value of attribute updated_time
8 9 10 |
# File 'lib/fb_graph/video.rb', line 8 def updated_time @updated_time end |