Sha256: d8653bd4fe015fabf7f33dab0c2a13b291b6fc119a3b432f184463464d7391ec

Contents?: true

Size: 505 Bytes

Versions: 1

Compression:

Stored size: 505 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])
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fb_graph-0.0.8 lib/fb_graph/comment.rb