1
0
mirror of https://github.com/glitch-soc/mastodon.git synced 2025-02-17 08:03:53 -05:00

11 lines
235 B
Ruby
Raw Normal View History

# 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