Class: RailsMFA::Providers::SmsProvider

Inherits:
Base
  • Object
show all
Defined in:
lib/rails_mfa/providers/sms_provider.rb

Overview

Example: host app can create a provider class that implements send_sms

Instance Method Summary collapse

Methods inherited from Base

#send_email

Constructor Details

#initialize(&block) ⇒ SmsProvider

Returns a new instance of SmsProvider.



7
8
9
# File 'lib/rails_mfa/providers/sms_provider.rb', line 7

def initialize(&block)
  @block = block
end

Instance Method Details

#send_sms(to, message) ⇒ Object



11
12
13
# File 'lib/rails_mfa/providers/sms_provider.rb', line 11

def send_sms(to, message)
  @block.call(to, message)
end