Rails in particular has a lot of class methods within its API. I'm not massively opinionated here, but perhaps the convention should be to drop brackets on method calls within class bodies
Input
class MyClass
helper :all
before_action :hello_world
include FooBarBaz
def self.foo
puts "foo"
end
private_class_method :foo
private_class_method def self.bar
puts "bar"
end
end
Current output
class MyClass
helper(:all)
before_action(:hello_world)
include(FooBarBaz)
def self.foo
puts 'foo'
end
private_class_method(:foo)
private_class_method(def self.bar
puts 'bar'
end)
end
Expected Output
Brackets are dropped from method/command calls within the class body
class MyClass
helper :all
before_action :hello_world
include FooBarBaz
def self.foo
puts 'foo'
end
private_class_method :foo
private_class_method def self.bar
puts 'bar'
end
end
Rails in particular has a lot of class methods within its API. I'm not massively opinionated here, but perhaps the convention should be to drop brackets on method calls within class bodies
Input
Current output
Expected Output
Brackets are dropped from method/command calls within the class body