Class: ClickAndSend::Encryption

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

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Encryption

Returns a new instance of Encryption.



6
7
8
# File 'lib/click_and_send/encryption.rb', line 6

def initialize(data)
  @data = data
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/click_and_send/encryption.rb', line 10

def to_s
  Base64.encode64(encrypted).chomp.gsub(/\={1,2}$/, '') unless @data.nil?
end