This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
|
# frozen_string_literal: true
|
|
|
|
class HashObject
|
|
def initialize(hash)
|
|
hash.each do |k, v|
|
|
instance_variable_set("@#{k}", v)
|
|
self.class.send(:define_method, k, proc { instance_variable_get("@#{k}") })
|
|
end
|
|
end
|
|
end
|