File: context.rb

package info (click to toggle)
ruby-doorkeeper 5.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 992 kB
  • sloc: ruby: 4,644; makefile: 4
file content (17 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Doorkeeper
  module OAuth
    module Authorization
      class Context
        attr_reader :client, :grant_type, :resource_owner, :scopes

        def initialize(**attributes)
          attributes.each do |name, value|
            instance_variable_set(:"@#{name}", value) if respond_to?(name)
          end
        end
      end
    end
  end
end