def resolve_value(thing, *args)
      case thing
      when Symbol
        symbol_method = method(thing)
        if symbol_method.arity > 0
          symbol_method.call(*args)
        else
          symbol_method.call
        end
      when Proc
        if thing.arity > 1
          thing.call(self, *args)
        elsif thing.arity > 0
          thing.call(self)
        else
          thing.call
        end
      when Hash
        thing.dup.tap do |hash|
          hash.each do |key, value|
            hash[key] = resolve_value(value, *args)
          end
        end
      else
        thing
      end
    end
def resolve_value(thing, *args)
      case thing
      when Symbol
        symbol_method = method(thing)
        if symbol_method.arity > 0
          symbol_method.call(*args)
        else
          symbol_method.call
        end
      when Proc
        if thing.arity > 1
          thing.call(self, *args)
        elsif thing.arity > 0
          thing.call(self)
        else
          thing.call
        end
      when Hash
        thing.dup.tap do |hash|
          hash.each do |key, value|
            hash[key] = resolve_value(value, *args)
          end
        end
      else
        thing
      end
    end
Used to transform value from metadata to data which belongs model instance.
 Accepts Symbols, which it will send against this instance,
 Accepts Procs, which it will execute with this instance.
 Both Symbols and Procs will be passed arguments of this method.
 Also accepts Hash of these Symbols or Procs.
 If any other value will be passed, returns original value.

 @param [Symbol, Proc, Hash, Object] thing Symbol or Proc to resolve parameter
 @param [Array] args Arguments to pass to thing as method
 @return [Object] Resolved parameter value