Class: Clearance::SignInGuard

Inherits:
Object
  • Object
show all
Defined in:
lib/clearance/sign_in_guard.rb

Direct Known Subclasses

DefaultSignInGuard

Instance Method Summary collapse

Constructor Details

#initialize(session, stack = []) ⇒ SignInGuard

Returns a new instance of SignInGuard



5
6
7
8
# File 'lib/clearance/sign_in_guard.rb', line 5

def initialize(session, stack = [])
  @session = session
  @stack = stack
end

Instance Method Details

#failure(message) ⇒ Object



14
15
16
# File 'lib/clearance/sign_in_guard.rb', line 14

def failure(message)
  FailureStatus.new(message)
end

#next_guardObject



18
19
20
# File 'lib/clearance/sign_in_guard.rb', line 18

def next_guard
  stack.call
end

#successObject



10
11
12
# File 'lib/clearance/sign_in_guard.rb', line 10

def success
  SuccessStatus.new
end