Module: Amalgam::Authorities::Model

Included in:
Amalgam::Authorities::Models::ActiveRecord
Defined in:
lib/amalgam/authorities/model.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object



36
37
38
# File 'lib/amalgam/authorities/model.rb', line 36

def self.included(receiver)
  receiver.extend         ClassMethods
end

Instance Method Details

#authenticate(password) ⇒ self or false

This method is abstract.

Returns self if the provided password is correct, false otherwise.

Parameters:

  • password (String)

    The password to check.

Returns:

  • (self or false)

    Self if authenticated, false if not.

Raises:

  • (NotImplementedError)


32
33
34
# File 'lib/amalgam/authorities/model.rb', line 32

def authenticate(password)
  raise NotImplementedError
end