Skip to content

Instantly share code, notes, and snippets.

@stemar
Last active May 23, 2016 23:01
Show Gist options
  • Save stemar/1995483 to your computer and use it in GitHub Desktop.
Save stemar/1995483 to your computer and use it in GitHub Desktop.
blank? method in Ruby
def blank?
self.respond_to?(:empty?) ? self.empty? : !self
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment