]> cat aescling's git repositories - mastodon.git/blob - app/lib/hash_object.rb
Fix search error when ElasticSearch is enabled but not available (#11954)
[mastodon.git] / app / lib / hash_object.rb
1 # frozen_string_literal: true
2
3 class HashObject
4 def initialize(hash)
5 hash.each do |k, v|
6 instance_variable_set("@#{k}", v)
7 self.class.send(:define_method, k, proc { instance_variable_get("@#{k}") })
8 end
9 end
10 end
This page took 0.073807 seconds and 5 git commands to generate.