card/lib/generators/set/set_generator.rb
Do not prefix writer method names with set_
. Invalid
Invalid
def set_path modifier=nil
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop makes sure that accessor methods are named properly.
Example:
# bad
def set_attribute(value)
end
# good
def attribute=(value)
end
# bad
def get_attribute
end
# good
def attribute
end