class HqTrivia::Model::IntCoerce

Overview

For coercing string ints to actual ints

Defined in:

hqtrivia/model/int_coerce.cr

Class Method Summary

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


[View source]
def self.to_json(value, builder) #

Converts an Int32 back to a string


[View source]