Class: CouchbaseOrm::Types::Encrypted

Inherits:
ActiveModel::Type::Value
  • Object
show all
Defined in:
lib/couchbase-orm/types/encrypted.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#algObject (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