def resolve_dependency(dependency)
      dependency.each do |operator, arguments|
        operator = operator.to_sym

        case operator
        when :and, :or
          return resolve_multi_dependency(operator, arguments)
        when :not
          return !resolve_dependency(arguments)
        end

        arguments = [arguments] unless arguments.is_a?(Array)

        values = arguments[0..1].map { |name| get_value(name) }
        return false if values.any?(&:nil?)

        case operator
        when :eq
          return values[0].to_s == values[1].to_s
        when :lt
          return values[0].to_f < values[1].to_f
        when :gt
          return values[0].to_f > values[1].to_f
        when :set
          return !values[0].empty?
        end
      end
    end
def resolve_dependency(dependency)
      dependency.each do |operator, arguments|
        operator = operator.to_sym

        case operator
        when :and, :or
          return resolve_multi_dependency(operator, arguments)
        when :not
          return !resolve_dependency(arguments)
        end

        arguments = [arguments] unless arguments.is_a?(Array)

        values = arguments[0..1].map { |name| get_value(name) }
        return false if values.any?(&:nil?)

        case operator
        when :eq
          return values[0].to_s == values[1].to_s
        when :lt
          return values[0].to_f < values[1].to_f
        when :gt
          return values[0].to_f > values[1].to_f
        when :set
          return !values[0].empty?
        end
      end
    end
Gets dependency rules hash and returns true or false depending on
 the result of a recursive processing of the rules