module T::Props::Serializable::ClassMethods

NB: This must stay in the same file where T::Props::Serializable is defined due to T::Props::Decorator#apply_plugin; see git.corp.stripe.com/stripe-internal/pay-server/blob/fc7f15593b49875f2d0499ffecfd19798bac05b3/chalk/odm/lib/chalk-odm/document_decorator.rb#L716-L717

Public Instance Methods

from_hash(hash, strict=false) click to toggle source

@!method self.from_hash(hash, strict)

Allocate a new instance and call {#deserialize} to load a new object from a hash. @return [Serializable]

# File lib/types/props/serializable.rb, line 354
def from_hash(hash, strict=false)
  self.decorator.from_hash(hash, strict)
end
from_hash!(hash) click to toggle source

Equivalent to {.from_hash} with `strict` set to true. @return [Serializable]

# File lib/types/props/serializable.rb, line 360
def from_hash!(hash)
  self.decorator.from_hash(hash, true)
end
prop_by_serialized_forms() click to toggle source
# File lib/types/props/serializable.rb, line 345
def prop_by_serialized_forms
  @prop_by_serialized_forms ||= {}
end