I am a Ruby beginner. From the book, I know that a Ruby method name should start with a lowercase letter or underscore. But I found different scenarios:
If a me
Don't do any of what you're trying to do. It's bad coding style.
Good Ruby coding style:
def method_name
end
# or
class CamelCase
def method_name(parameter_name)
end
end
Almost anything else is simply wrong. The language might let you do other stuff, but that doesn't mean you should.
Also, generally you don't want to be defining methods outside of a class or module — that's acceptable in short throw-away scripts, but not in projects of substance.