Sha256: d99480eb5542af15ac15f9235ba0210b3cf7b9f56e49d9949c5de67181fded9c
Contents?: true
Size: 755 Bytes
Versions: 32
Compression:
Stored size: 755 Bytes
Contents
module FbGraph class Message < Node # TODO: # include Connections::Attachments # include Connections::Shares include Connections::Tags attr_accessor :message, :from, :to, :created_time def initialize(identifier, attributes = {}) super @message = attributes[:message] if (from = attributes[:from]) @from = User.new(from[:id], from) end @to = [] if attributes[:to] Collection.new(attributes[:to]).each do |to| @to << User.new(to[:id], to) end end if attributes[:created_time] @created_time = Time.parse(attributes[:created_time]).utc end # cached connection @_tags_ = Collection.new(attributes[:tags]) end end end
Version data entries
32 entries across 32 versions & 1 rubygems