Class: Monban::Services::SignIn

Inherits:
Object
  • Object
show all
Defined in:
lib/monban/services/sign_in.rb

Overview

Sign in service. Signs the user in via warden

Since:

  • 0.0.15

Instance Method Summary collapse

Constructor Details

#initialize(user, warden) ⇒ SignIn

Initialize service

Parameters:

  • user (User)

    A user object

  • warden (Warden)

    warden

Since:

  • 0.0.15



10
11
12
13
# File 'lib/monban/services/sign_in.rb', line 10

def initialize user, warden
  @user = user
  @warden = warden
end

Instance Method Details

#performObject

Perform the service

Since:

  • 0.0.15



16
17
18
# File 'lib/monban/services/sign_in.rb', line 16

def perform
  warden.set_user(user)
end