Sha256: 86fc1eae25696035db9ec40f1657ec178b356f9b8976c75157088628902c818b

Contents?: true

Size: 600 Bytes

Versions: 14

Compression:

Stored size: 600 Bytes

Contents

module FbGraph
  class Status < Node
    include Connections::Comments
    include Connections::Likes

    attr_accessor :from, :message, :updated_time

    def initialize(identifier, attributes = {})
      super
      if (from = attributes[:from])
        @from = if from[:category]
          FbGraph::Page.new(from.delete(:id), from)
        else
          FbGraph::User.new(from.delete(:id), from)
        end
      end
      @message = attributes[:message]
      if (updated_time = attributes.delete(:updated_time))
        @updated_time = Time.parse(updated_time).utc
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
fb_graph-1.1.4 lib/fb_graph/status.rb
fb_graph-1.1.3 lib/fb_graph/status.rb
fb_graph-1.1.2 lib/fb_graph/status.rb
fb_graph-1.1.1 lib/fb_graph/status.rb
fb_graph-1.1.0 lib/fb_graph/status.rb
fb_graph-1.0.7 lib/fb_graph/status.rb
fb_graph-1.0.6 lib/fb_graph/status.rb
fb_graph-1.0.5 lib/fb_graph/status.rb
palidanx-fb_graph-1.0.4 lib/fb_graph/status.rb
fb_graph-1.0.4 lib/fb_graph/status.rb
fb_graph-1.0.3 lib/fb_graph/status.rb
fb_graph-1.0.2 lib/fb_graph/status.rb
fb_graph-1.0.1 lib/fb_graph/status.rb
fb_graph-1.0.0 lib/fb_graph/status.rb