Skip to content

Instantly share code, notes, and snippets.

@nassredean
Created December 16, 2015 16:10
Show Gist options
  • Save nassredean/19e1029d4e9fc5297928 to your computer and use it in GitHub Desktop.
Save nassredean/19e1029d4e9fc5297928 to your computer and use it in GitHub Desktop.
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