Sha256: 30cf5a6feefd7f6cd8d0d291da3786f5c9939a49fcc821db23070ecb765f3b61

Contents?: true

Size: 572 Bytes

Versions: 52

Compression:

Stored size: 572 Bytes

Contents

module FbGraph
  class Review < Node
    attr_accessor :from, :to, :message, :rating, :created_time

    def initialize(identifier, attributes = {})
      super
      @from = if attributes[:from]
        User.new(attributes[:from][:id], attributes[:from])
      end
      @to = if attributes[:to]
        Application.new(attributes[:to][:id], attributes[:to])
      end
      @message = attributes[:message]
      @rating = attributes[:rating]
      @created_time = if attributes[:created_time]
        Time.parse(attributes[:created_time]).utc
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
fb_graph-2.4.13 lib/fb_graph/review.rb
fb_graph-2.4.12 lib/fb_graph/review.rb
fb_graph-2.4.11 lib/fb_graph/review.rb
fb_graph-2.4.10 lib/fb_graph/review.rb
fb_graph-2.4.9 lib/fb_graph/review.rb
fb_graph-2.4.8 lib/fb_graph/review.rb
fb_graph-2.4.7 lib/fb_graph/review.rb
fb_graph-2.4.6 lib/fb_graph/review.rb
fb_graph-2.4.4 lib/fb_graph/review.rb
fb_graph-2.4.3 lib/fb_graph/review.rb
fb_graph-2.4.2 lib/fb_graph/review.rb
fb_graph-2.4.1 lib/fb_graph/review.rb
fb_graph-2.4.0 lib/fb_graph/review.rb
fb_graph-2.3.2 lib/fb_graph/review.rb
fb_graph-2.3.1 lib/fb_graph/review.rb
fb_graph-2.3.0 lib/fb_graph/review.rb
fb_graph-2.2.6 lib/fb_graph/review.rb
fb_graph-2.2.5 lib/fb_graph/review.rb
fb_graph-2.2.4 lib/fb_graph/review.rb
fb_graph-2.2.3 lib/fb_graph/review.rb