Class: Tanker::CTanker::CEmailVerification

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/tanker/c_tanker/c_verification.rb

Instance Method Summary collapse

Constructor Details

#initialize(email, verification_code) ⇒ CEmailVerification

Returns a new instance of CEmailVerification.



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/tanker/c_tanker/c_verification.rb', line 14

def initialize(email, verification_code)
  super()

  # NOTE: Instance variables are required to keep the CStrings alive
  @email = CTanker.new_cstring email
  @verification_code = CTanker.new_cstring verification_code

  self[:version] = 1
  self[:email] = @email
  self[:verification_code] = @verification_code
end