Class: OctopusAuth::Queries::ByScope

Inherits:
Object
  • Object
show all
Defined in:
lib/octopus_auth/queries/by_scope.rb

Instance Method Summary collapse

Constructor Details

#initialize(scope, owner_type, owner_id) ⇒ ByScope

Returns a new instance of ByScope.



4
5
6
7
8
# File 'lib/octopus_auth/queries/by_scope.rb', line 4

def initialize(scope, owner_type, owner_id)
  @scope        = scope.to_sym
  @owner_type   = owner_type
  @owner_id     = owner_id
end

Instance Method Details

#executeObject



10
11
12
13
14
# File 'lib/octopus_auth/queries/by_scope.rb', line 10

def execute
  relation.map do |token|
    OctopusAuth::Decorators::Default.new(token)
  end
end