Class: Trocla::Encryptions::Base
- Inherits:
-
Object
- Object
- Trocla::Encryptions::Base
- Defined in:
- lib/trocla/encryptions.rb
Overview
Base
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(_) ⇒ Object
- #encrypt(_) ⇒ Object
-
#initialize(config, trocla) ⇒ Base
constructor
A new instance of Base.
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
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/trocla/encryptions.rb', line 7 def config @config end |
#trocla ⇒ Object (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
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
14 15 16 17 |
# File 'lib/trocla/encryptions.rb', line 14 def encrypt(_) raise NoMethodError.new("#{self.class.name} needs to implement 'encrypt()'") end |