Let's create a new Turing Struct class which wraps a hash and exposes its keys as methods.
A Turing Struct accepts a hash when it's initialized, e.g.:
TuringStruct.new({my: "hash"})When we provide a hash to a TuringStruct, we can then ask it for the keys of that hash as if they were methods:
struct = TuringStruct.new({some: "value", another: "thing"})
struct.some
# => "value"
struct.another
# => "thing"Extension: Once you have a working struct, see what it would take to allow method-chaining to retrieve nested hash data
struct = TuringStruct.new({nested: {another: "hash"})
struct.nested.another
# => "hash"