Sha256: 3e3f951ecd7b75d59cd736700680e784da497a5974a03c00d12a1c1d95aa764d

Contents?: true

Size: 441 Bytes

Versions: 18

Compression:

Stored size: 441 Bytes

Contents

module FbGraph
  module Connections
    module Permissions
      def permissions(options = {})
        self.connection(:permissions, options).first.try(:inject, []) do |arr, (key, value)|
          arr << key.to_sym if value.to_i == 1
          arr
        end || []
      end

      def revoke!(permission = nil, options = {})
        destroy options.merge(:permission => permission, :connection => :permissions)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
fb_graph-2.7.13 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.12 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.11 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.10 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.9 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.8 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.7 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.6 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.5 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.4 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.3 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.2 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.1 lib/fb_graph/connections/permissions.rb
fb_graph-2.7.0 lib/fb_graph/connections/permissions.rb
fb_graph-2.6.7 lib/fb_graph/connections/permissions.rb
fb_graph-2.6.6 lib/fb_graph/connections/permissions.rb
fb_graph-2.6.5 lib/fb_graph/connections/permissions.rb
fb_graph-2.6.4 lib/fb_graph/connections/permissions.rb