Sha256: 3232050c279ed465e0dd948fd74b7d1ff5be9843d17eec6158ec57470a648562

Contents?: true

Size: 572 Bytes

Versions: 14

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

module BrowseEverything
  module Driver
    # Class for instantiating authentication API Objects
    class AuthenticationFactory
      # Constructor
      # @param klass [Class] the authentication object class
      # @param params [Array, Hash] the parameters for the authentication constructor
      def initialize(klass, *params)
        @klass = klass
        @params = params
      end

      # Constructs an authentication Object
      # @return [Object]
      def authenticate
        @klass.new(*@params)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
browse-everything-1.5.0 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.4.0 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.3.0 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.2.0 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.1.2 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.1.1 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.1.0 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.0.2 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.0.1 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.0.0 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.0.0.rc2 lib/browse_everything/driver/authentication_factory.rb
browse-everything-1.0.0.rc1 lib/browse_everything/driver/authentication_factory.rb
browse-everything-0.16.1 lib/browse_everything/driver/authentication_factory.rb
browse-everything-0.16.0 lib/browse_everything/driver/authentication_factory.rb