A public method is a Ruby method that can be called through ordinary method-call syntax with an explicit receiver. Public is Ruby’s default access level, so a method remains public unless it is declared protected or private. Public instance methods form the everyday interface through which objects respond to messages. section 5.3
Calling and inspecting public methods
A string exposes public operations such as `upcase`, `downcase`, and `swapcase`; calling `string.upcase` sends the `upcase` message through an explicit receiver. To inspect available non-private methods, call `string.methods`, then filter and sort the returned array of symbols. section 5.3 section 15.2.1
>> string = "Test string"
=> "Test string"
>> string.methods.grep(/case/).sort
=> [:casecmp, :casecmp?, :downcase, :downcase!, :swapcase, :swapcase!,
➥ :upcase, :upcase!]
Inspect a string’s case-related method names, including public operations and their bang-method variants. section 15.2.1
Public methods should be distinguished from the broader result of `methods`: that query lists non-private methods, meaning public or protected methods. Method-name searches can reveal likely capabilities, but interpreting the results still requires judgment; naming conventions provide useful clues rather than a complete semantic explanation. section 15.2 section 15.2.1
