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.2.2 lib/fb_graph/review.rb
fb_graph-2.2.1 lib/fb_graph/review.rb
fb_graph-2.2.0 lib/fb_graph/review.rb
fb_graph-2.2.0.beta lib/fb_graph/review.rb
fb_graph-2.2.0.alpha2 lib/fb_graph/review.rb
fb_graph-2.2.0.alpha lib/fb_graph/review.rb
fb_graph-2.1.13 lib/fb_graph/review.rb
fb_graph-2.1.12 lib/fb_graph/review.rb
fb_graph-2.1.11 lib/fb_graph/review.rb
fb_graph-2.1.10 lib/fb_graph/review.rb
fb_graph-2.1.9 lib/fb_graph/review.rb
fb_graph-2.1.8 lib/fb_graph/review.rb
fb_graph-2.1.7 lib/fb_graph/review.rb
fb_graph-2.1.6 lib/fb_graph/review.rb
fb_graph-2.1.5 lib/fb_graph/review.rb
fb_graph-2.1.4 lib/fb_graph/review.rb
fb_graph-2.1.3 lib/fb_graph/review.rb
fb_graph-2.1.2 lib/fb_graph/review.rb
fb_graph-2.1.1 lib/fb_graph/review.rb
fb_graph-2.1.0 lib/fb_graph/review.rb