Refactor schema method

For https://github.com/dmitrizagidulin/rj-activemodel/issues/1