Created
December 16, 2015 16:10
-
-
Save nassredean/19e1029d4e9fc5297928 to your computer and use it in GitHub Desktop.
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
def format(object, type = nil) | |
core_class = cast(object, type) | |
awesome = if core_class != :self | |
send(:"awesome_#{core_class}", object) # Core formatters. | |
else | |
awesome_self(object, type) # Catch all that falls back to object.inspect. | |
end | |
awesome | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment