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