Class: HasSecurePasskey::AddPasskey

Inherits:
Object
  • Object
show all
Defined in:
lib/has_secure_passkey/add_passkey.rb

Instance Method Summary collapse

Constructor Details

#initialize(authenticatable:, params:) ⇒ AddPasskey

Returns a new instance of AddPasskey.



2
3
4
5
# File 'lib/has_secure_passkey/add_passkey.rb', line 2

def initialize(authenticatable:, params:)
  @authenticatable = authenticatable
  @params = params
end

Instance Method Details

#saveObject



7
8
9
10
11
12
13
14
# File 'lib/has_secure_passkey/add_passkey.rb', line 7

def save
  if valid?
    passkey.save
    passkey
  else
    false
  end
end