Class: Decidim::Verifications::Sms::ExampleGateway
- Inherits:
-
Object
- Object
- Decidim::Verifications::Sms::ExampleGateway
- Defined in:
- lib/decidim/verifications/sms/example_gateway.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#mobile_phone_number ⇒ Object
readonly
Returns the value of attribute mobile_phone_number.
Instance Method Summary collapse
- #deliver_code ⇒ Object
-
#initialize(mobile_phone_number, code, context = {}) ⇒ ExampleGateway
constructor
A new instance of ExampleGateway.
Constructor Details
#initialize(mobile_phone_number, code, context = {}) ⇒ ExampleGateway
Returns a new instance of ExampleGateway.
9 10 11 12 13 |
# File 'lib/decidim/verifications/sms/example_gateway.rb', line 9 def initialize(mobile_phone_number, code, context = {}) @mobile_phone_number = mobile_phone_number @code = code @context = context end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/decidim/verifications/sms/example_gateway.rb', line 7 def code @code end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
7 8 9 |
# File 'lib/decidim/verifications/sms/example_gateway.rb', line 7 def context @context end |
#mobile_phone_number ⇒ Object (readonly)
Returns the value of attribute mobile_phone_number.
7 8 9 |
# File 'lib/decidim/verifications/sms/example_gateway.rb', line 7 def mobile_phone_number @mobile_phone_number end |
Instance Method Details
#deliver_code ⇒ Object
15 16 17 18 |
# File 'lib/decidim/verifications/sms/example_gateway.rb', line 15 def deliver_code Rails.logger.debug { "Example SMS gateway service, verification code is: #{code}, should have been delivered to #{mobile_phone_number}" } true end |