module Doorkeeper::Models::Scopes

Public Instance Methods

includes_scope?(*required_scopes) click to toggle source
# File lib/doorkeeper/models/concerns/scopes.rb, line 22
def includes_scope?(*required_scopes)
  required_scopes.blank? || required_scopes.any? { |scope| scopes.exists?(scope.to_s) }
end
scopes() click to toggle source
# File lib/doorkeeper/models/concerns/scopes.rb, line 6
def scopes
  OAuth::Scopes.from_string(scopes_string)
end
scopes=(value) click to toggle source
Calls superclass method
# File lib/doorkeeper/models/concerns/scopes.rb, line 10
def scopes=(value)
  if value.is_a?(Array)
    super(Doorkeeper::OAuth::Scopes.from_array(value).to_s)
  else
    super(Doorkeeper::OAuth::Scopes.from_string(value.to_s).to_s)
  end
end
scopes_string() click to toggle source
# File lib/doorkeeper/models/concerns/scopes.rb, line 18
def scopes_string
  self[:scopes]
end