I am trying to convert hash and nested hashes to objects.
so far first hash object is converted successfully by this code:
class Hashit def initialize(
Another way is to use JSON and OpenStruct, which are standard ruby libs:
irb: > require 'JSON' => true > r = JSON.parse({a: { b: { c: 1 }}}.to_json, object_class: OpenStruct) => #>> > r.a.b.c => 1