Here's a definition of types and methods
short version
{
"name": "Abi",
"type": "EnumOfTypes",
"enum_types": [
{
"name": "Contract",
"type": "Struct",
"struct_fields": [
{
"name": "value",
"type": "Ref",
"ref_name": "abi.AbiContract",
"summary": null,
"description": null
}
],
"summary": null,
"description": null
},
{
"name": "Json",
"type": "Struct",
"struct_fields": [
{
"name": "value",
"type": "String",
"summary": null,
"description": null
}
],
"summary": null,
"description": null
},
pastebin:
The JSON document changes frequently. At the moment Ruby classes, types, methods... are written by hand and updated by hand too.
I've tried 1-2 Ruby code generators and they haven't worked. Is there a decent Ruby code generator out there that will be capable to work with this document and that'll generate code that's efficient and simple enough? Code should be without any additional dependencies or complicated unnecessary classes, structs...
Or how, in a nutshell, could I write a simple generator myself? The difficulty is that Ruby is dynamically types language.