Class: Authenticate::Failure

Inherits:
Object
  • Object
show all
Defined in:
lib/authenticate/login_status.rb

Overview

Indicate login attempt was a failure, with a message. Allows caller to supply a block to login() predicated on success?

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ Failure

Returns a new instance of Failure.

Parameters:

  • message (String)

    The reason the login failed.


20
21
22
# File 'lib/authenticate/login_status.rb', line 20

def initialize(message)
  @message = message
end

Instance Attribute Details

#messageObject (readonly)

The reason the sign in failed.


17
18
19
# File 'lib/authenticate/login_status.rb', line 17

def message
  @message
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)

24
25
26
# File 'lib/authenticate/login_status.rb', line 24

def success?
  false
end