Sha256: 7089050697b66f61e7dcc4e12e813dc4c47efaa82a1d766299c45e42e0751b49

Contents?: true

Size: 740 Bytes

Versions: 29

Compression:

Stored size: 740 Bytes

Contents

module FbGraph
  class AppRequest < Node

    attr_accessor :application, :created_time, :data, :from, :message, :to

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

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
fb_graph-1.8.0 lib/fb_graph/app_request.rb
fb_graph-1.8.0.alpha2 lib/fb_graph/app_request.rb
fb_graph-1.7.5 lib/fb_graph/app_request.rb
fb_graph-1.8.0.alpha lib/fb_graph/app_request.rb
fb_graph-1.7.4 lib/fb_graph/app_request.rb
fb_graph-1.7.3 lib/fb_graph/app_request.rb
fb_graph-1.7.2 lib/fb_graph/app_request.rb
fb_graph-1.7.1 lib/fb_graph/app_request.rb
fb_graph-1.7.0 lib/fb_graph/app_request.rb
fb_graph-1.7.0.alpha2 lib/fb_graph/app_request.rb
fb_graph-1.6.9 lib/fb_graph/app_request.rb
fb_graph-1.7.0.alpha lib/fb_graph/app_request.rb
fb_graph-1.6.8 lib/fb_graph/app_request.rb
fb_graph-1.6.7 lib/fb_graph/app_request.rb
fb_graph-1.6.5 lib/fb_graph/app_request.rb
fb_graph-1.6.4 lib/fb_graph/app_request.rb
fb_graph-1.6.3 lib/fb_graph/app_request.rb
fb_graph-1.6.2 lib/fb_graph/app_request.rb
fb_graph-1.6.1 lib/fb_graph/app_request.rb
fb_graph-1.6.0 lib/fb_graph/app_request.rb