Module: HaveAPI::GoClient::AuthenticationMethods

Defined in:
lib/haveapi/go_client/authentication_methods.rb

Class Method Summary collapse

Class Method Details

.get(name) ⇒ Object

Parameters:

  • name (String)


13
14
15
# File 'lib/haveapi/go_client/authentication_methods.rb', line 13

def self.get(name)
  @methods[name.to_sym]
end

.new(api_version, name) ⇒ Object

Parameters:



19
20
21
22
# File 'lib/haveapi/go_client/authentication_methods.rb', line 19

def self.new(api_version, name, *)
  klass = get(name) || Authentication::Unsupported
  klass.new(api_version, name, *)
end

.register(name, klass) ⇒ Object

Parameters:

  • name (Symbol)
  • klass (Class)


7
8
9
10
# File 'lib/haveapi/go_client/authentication_methods.rb', line 7

def self.register(name, klass)
  @methods ||= {}
  @methods[name] = klass
end