a friendly Ruby Object!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
def to_s | |
"I am friendly. You can debug here thru formatted string." | |
end | |
end | |
foo = Foo.new # "I am friendly. You can debug here thru formatted string." | |
foo # "I am friendly. You can debug here thru formatted string." | |
# alternatively | |
class Foo | |
def inspect | |
"I am friendly. You can debug here thru formatted string." | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment