Sha256: 1bafce2f7acc5f63e4e02e242fc8a0ff8f0c8a38afc80208902a2f20ac9279fa

Contents?: true

Size: 509 Bytes

Versions: 14

Compression:

Stored size: 509 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]
      if options[:created_time]
        @created_time = Time.parse(options[:created_time]).utc
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fb_graph-0.7.0 lib/fb_graph/comment.rb
fb_graph-0.6.0 lib/fb_graph/comment.rb
fb_graph-0.5.0 lib/fb_graph/comment.rb
fb_graph-0.4.2 lib/fb_graph/comment.rb
fb_graph-0.4.1 lib/fb_graph/comment.rb
fb_graph-0.4.0 lib/fb_graph/comment.rb
fb_graph-0.3.0 lib/fb_graph/comment.rb
fb_graph-0.2.2 lib/fb_graph/comment.rb
fb_graph-0.2.1 lib/fb_graph/comment.rb
fb_graph-0.2.0 lib/fb_graph/comment.rb
fb_graph-0.1.3 lib/fb_graph/comment.rb
fb_graph-0.1.2 lib/fb_graph/comment.rb
fb_graph-0.1.1 lib/fb_graph/comment.rb
fb_graph-0.1.0 lib/fb_graph/comment.rb