Class: SendGrid::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/sendgrid/helpers/permissions/scope.rb

Constant Summary collapse

SCOPES =
YAML.load_file("#{File.dirname(__FILE__)}/scopes.yml").freeze

Class Method Summary collapse

Class Method Details

.admin_permissionsObject



9
10
11
# File 'lib/sendgrid/helpers/permissions/scope.rb', line 9

def admin_permissions
  SCOPES.values.map(&:values).flatten
end

.read_only_permissionsObject



13
14
15
# File 'lib/sendgrid/helpers/permissions/scope.rb', line 13

def read_only_permissions
  SCOPES.map { |_, v| v[:read] }.flatten
end