normalize-syntax-rules 0.3.2

Syntax-based linting rules with tree-sitter queries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# method_missing without respond_to_missing?

class Proxy
  def method_missing(name, *args)
    @target.send(name, *args)
  end
end

class DynamicFinder
  def method_missing(method_name, *arguments, &block)
    if method_name.to_s.start_with?("find_by_")
      find(method_name.to_s.sub("find_by_", ""), *arguments)
    else
      super
    end
  end
end