class AWS::Record::Attributes::StringAttr
def self.allow_set?
- Api: - private
def self.allow_set? true end
def self.serialize string, options = {}
-
(String)- The serialized string.
Parameters:
-
options(Hash) -- -
string(String) --
def self.serialize string, options = {} unless string.is_a?(String) msg = "expected a String value, got #{string.class}" raise ArgumentError, msg end string end
def self.type_cast raw_value, options = {}
-
(String, nil)- The type casted value.
Options Hash:
(**options)-
:preserve_empty_strings(Boolean) -- When true,
Parameters:
-
options(Hash) -- -
raw_value(Mixed) --
def self.type_cast raw_value, options = {} case raw_value when nil then nil when '' then options[:preserve_empty_strings] ? '' : nil when String then raw_value else raw_value.to_s end end