Class: Trocla::Encryptions::Base
- Inherits:
-
Object
- Object
- Trocla::Encryptions::Base
- Defined in:
- lib/trocla/encryptions.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#trocla ⇒ Object
readonly
Returns the value of attribute trocla.
Instance Method Summary collapse
- #decrypt(value) ⇒ Object
- #encrypt(value) ⇒ Object
-
#initialize(config, trocla) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(config, trocla) ⇒ Base
Returns a new instance of Base.
5 6 7 8 |
# File 'lib/trocla/encryptions.rb', line 5 def initialize(config, trocla) @trocla = trocla @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/trocla/encryptions.rb', line 4 def config @config end |
#trocla ⇒ Object (readonly)
Returns the value of attribute trocla.
4 5 6 |
# File 'lib/trocla/encryptions.rb', line 4 def trocla @trocla end |
Instance Method Details
#decrypt(value) ⇒ Object
14 15 16 |
# File 'lib/trocla/encryptions.rb', line 14 def decrypt(value) raise NoMethodError.new("#{self.class.name} needs to implement 'decrypt()'") end |
#encrypt(value) ⇒ Object
10 11 12 |
# File 'lib/trocla/encryptions.rb', line 10 def encrypt(value) raise NoMethodError.new("#{self.class.name} needs to implement 'encrypt()'") end |