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.
6 7 8 9 |
# File 'lib/couchbase-orm/types/encrypted.rb', line 6 def initialize(alg: "CB_MOBILE_CUSTOM") @alg = alg super() end |
Instance Attribute Details
#alg ⇒ Object (readonly)
Returns the value of attribute alg.
4 5 6 |
# File 'lib/couchbase-orm/types/encrypted.rb', line 4 def alg @alg end |
Instance Method Details
#serialize(value) ⇒ Object
11 12 13 14 |
# File 'lib/couchbase-orm/types/encrypted.rb', line 11 def serialize(value) return nil if value.nil? value end |