Avram::Attribute(T)
Constructors
Instance methods
[](key)
Source[]?(key)
Sourceallow_blank=(allow_blank : Bool)
This can be used as an escape hatch when you may have a blank string that's allowed to be saved.
allow_blank?
This can be used as an escape hatch when you may have a blank string that's allowed to be saved.
errors
Sourceextract(params : Avram::Paramable)
Sourcename
Sourceoriginal_value
Sourceparam
Sourceparam_key
Sourcepermitted
Sourcereset_errors
Sourceto_f
Sourceto_f64
Sourceto_i
Sourceto_i32
Sourceto_i64
Sourceto_s(time_format : String)
NOTE: to_s(io : IO) is used when passing an object in to string interpolation. Don't override that method.
to_s
These methods may accidentally get called on attributes inside of operations. Since these methods don't exist, chances are, you meant to call them on the value.
username.to_s
# VS
username.value.to_s
valid?
Sourcevalue
Sourcevalue=(value : T | Nil)
SourceMacros
call_value_instead_error_message(method)
Source