Sha256: 04a9af14c3306b9e2739580f21de13eebd92e0e3fe49ea264efce7cca37190f7
Contents?: true
Size: 881 Bytes
Versions: 6
Compression:
Stored size: 881 Bytes
Contents
module FbGraph class Video < Node include Connections::Comments include Connections::Likes attr_accessor :from, :message, :description, :length, :created_time, :updated_time 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 @message = attributes[:message] @description = attributes[:description] @length = attributes[:length] 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 @_comments_ = Collection.new(attributes[:comments]) end end end
Version data entries
6 entries across 6 versions & 1 rubygems