class HqTrivia::Model::IntCoerce
- HqTrivia::Model::IntCoerce
- Reference
- Object
Overview
For coercing string ints to actual ints
Defined in:
hqtrivia/model/int_coerce.crClass Method Summary
-
.from_json(json : JSON::PullParser)
Attempts to coerce a string int, ie "123" into an actual int.
-
.to_json(value, builder)
Converts an Int32 back to a string
Class Method Detail
def self.from_json(json : JSON::PullParser)
#
Attempts to coerce a string int, ie "123" into an actual int. Works even if it already is an Int32