Class: Trocla::Encryptions::Base

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

Overview

Base

Direct Known Subclasses

None, Ssl

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, trocla) ⇒ Base

Returns a new instance of Base.



9
10
11
12
# File 'lib/trocla/encryptions.rb', line 9

def initialize(config, trocla)
  @trocla = trocla
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



7
8
9
# File 'lib/trocla/encryptions.rb', line 7

def config
  @config
end

#troclaObject (readonly)

Returns the value of attribute trocla.



7
8
9
# File 'lib/trocla/encryptions.rb', line 7

def trocla
  @trocla
end

Instance Method Details

#decrypt(_) ⇒ Object

Raises:

  • (NoMethodError)


19
20
21
22
# File 'lib/trocla/encryptions.rb', line 19

def decrypt(_)
  raise NoMethodError.new("#{self.class.name} needs to implement 'decrypt()'")

end

#encrypt(_) ⇒ Object

Raises:

  • (NoMethodError)


14
15
16
17
# File 'lib/trocla/encryptions.rb', line 14

def encrypt(_)
  raise NoMethodError.new("#{self.class.name} needs to implement 'encrypt()'")

end