Class: CouchbaseOrm::Types::Encrypted
- Inherits:
-
ActiveModel::Type::Value
- Object
- ActiveModel::Type::Value
- CouchbaseOrm::Types::Encrypted
- Defined in:
- lib/couchbase-orm/types/encrypted.rb
Instance Attribute Summary collapse
-
#alg ⇒ Object
readonly
Returns the value of attribute alg.
Instance Method Summary collapse
-
#initialize(alg: 'CB_MOBILE_CUSTOM') ⇒ Encrypted
constructor
A new instance of Encrypted.
- #serialize(value) ⇒ Object
Constructor Details
#initialize(alg: 'CB_MOBILE_CUSTOM') ⇒ Encrypted
Returns a new instance of Encrypted.
8 9 10 11 |
# File 'lib/couchbase-orm/types/encrypted.rb', line 8 def initialize(alg: 'CB_MOBILE_CUSTOM') @alg = alg super() end |
Instance Attribute Details
#alg ⇒ Object (readonly)
Returns the value of attribute alg.
6 7 8 |
# File 'lib/couchbase-orm/types/encrypted.rb', line 6 def alg @alg end |
Instance Method Details
#serialize(value) ⇒ Object
13 14 15 16 17 |
# File 'lib/couchbase-orm/types/encrypted.rb', line 13 def serialize(value) return nil if value.nil? value end |