class FormObject::Coercer
- FormObject::Coercer
- Reference
- Object
Defined in:
form_object/coercer.crInstance Method Summary
- #coerce(value : String, str_class : String)
- #coerce(value : Nil, str_class : String)
-
#to_array(value : String, str_class : String)
Converts single string array.
- #to_b(value : String)
- #to_f(value : String)
- #to_f32(value : String)
- #to_i(value : String)
- #to_i16(value : String)
- #to_i64(value : String)
- #to_json(value : String)
- #to_pr32(value : String)
- #to_pr64(value : String)
- #to_s(value : String)
- #to_time(value : String)
Instance Method Detail
def to_array(value : String, str_class : String)
#
Converts single string array.
coercer.to_array("[1]", "Array(Int32)") # [1]