Sha256: 44d5b335a25d6f6da301fdf30bc72bd37ce398dd2d68a65aa99f0aabefc6194b

Contents?: true

Size: 456 Bytes

Versions: 6

Compression:

Stored size: 456 Bytes

Contents

module FbGraph
  class Comment < Node
    attr_accessor :from, :message, :created_time

    def initialize(identifier, options = {})
      super
      if (from = options[:from])
        @from = if from[:category]
          FbGraph::Page.new(from.delete(:id), from) 
        else
          FbGraph::User.new(from.delete(:id), from) 
        end
      end
      @message      = options[:message]
      @created_time = options[:created_time]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fb_graph-0.0.7 lib/fb_graph/comment.rb
fb_graph-0.0.6 lib/fb_graph/comment.rb
fb_graph-0.0.5 lib/fb_graph/comment.rb
fb_graph-0.0.4 lib/fb_graph/comment.rb
fb_graph-0.0.3 lib/fb_graph/comment.rb
fb_graph-0.0.2 lib/fb_graph/comment.rb