Sha256: 581466fc5d62d4176c44a719fdda42d35506d36b5b9ea2206f629cdac24f2fe9
Contents?: true
Size: 982 Bytes
Versions: 2
Compression:
Stored size: 982 Bytes
Contents
module FbGraph class Link < Node include Connections::Comments attr_accessor :from, :link, :name, :caption, :description, :icon, :picture, :message, :created_time def initialize(identifier, attributes = {}) super if (from = attributes[:from]) @from = if from[:category] Page.new(from.delete(:id), from) else User.new(from.delete(:id), from) end end @name = attributes[:name] @link = attributes[:link] @caption = attributes[:caption] @description = attributes[:description] @icon = attributes[:icon] @picture = attributes[:picture] # NOTE: this is external image, so isn't connection. @message = attributes[:message] if attributes[:created_time] @created_time = Time.parse(attributes[:created_time]).utc end # cached connection @_comments_ = Collection.new(attributes[:comments]) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fb_graph-1.2.3 | lib/fb_graph/link.rb |
fb_graph-1.2.2 | lib/fb_graph/link.rb |