Class: Tanker::CTanker::CPhoneNumberVerification
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Tanker::CTanker::CPhoneNumberVerification
- Defined in:
- lib/tanker/c_tanker/c_verification.rb
Instance Method Summary collapse
-
#initialize(phone_number, verification_code) ⇒ CPhoneNumberVerification
constructor
A new instance of CPhoneNumberVerification.
Constructor Details
#initialize(phone_number, verification_code) ⇒ CPhoneNumberVerification
Returns a new instance of CPhoneNumberVerification.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/tanker/c_tanker/c_verification.rb', line 32 def initialize(phone_number, verification_code) super() # NOTE: Instance variables are required to keep the CStrings alive @phone_number = CTanker.new_cstring phone_number @verification_code = CTanker.new_cstring verification_code self[:version] = 1 self[:phone_number] = @phone_number self[:verification_code] = @verification_code end |