Sha256: 57065b8d6410e50c6c65eecf27131060157a08215e3bab23fb0954f1ddf23440

Contents?: true

Size: 536 Bytes

Versions: 12

Compression:

Stored size: 536 Bytes

Contents

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

    def initialize(identifier, attributes = {})
      super

      @from = if (from = attributes[:from])
        User.new from[:id], from
      end
      @to = if (to = attributes[:to])
        Application.new to[:id], to
      end
      @message = attributes[:message]
      @rating = attributes[:rating]

      if attributes[:created_time]
        @created_time = Time.parse(attributes[:created_time]).utc
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fb_graph-2.7.17 lib/fb_graph/review.rb
fb_graph-2.7.16 lib/fb_graph/review.rb
fb_graph-2.7.15 lib/fb_graph/review.rb
fb_graph-2.7.14 lib/fb_graph/review.rb
fb_graph-2.7.13 lib/fb_graph/review.rb
fb_graph-2.7.12 lib/fb_graph/review.rb
fb_graph-2.7.11 lib/fb_graph/review.rb
fb_graph-2.7.10 lib/fb_graph/review.rb
fb_graph-2.7.9 lib/fb_graph/review.rb
fb_graph-2.7.8 lib/fb_graph/review.rb
fb_graph-2.7.7 lib/fb_graph/review.rb
fb_graph-2.7.6 lib/fb_graph/review.rb