Class: Pct::Decryptable

Inherits:
Object
  • Object
show all
Defined in:
lib/pct.rb

Instance Method Summary collapse

Constructor Details

#initialize(crypted) ⇒ Decryptable

Returns a new instance of Decryptable.



11
12
13
# File 'lib/pct.rb', line 11

def initialize(crypted)
  @crypted = crypted
end

Instance Method Details

#decryptedObject



15
16
17
18
19
# File 'lib/pct.rb', line 15

def decrypted
  @decrypted ||= Pct.client.decrypt({
    ciphertext_blob: Base64.decode64(@crypted)
  }).plaintext
end