Skip to content

Instantly share code, notes, and snippets.

@baldwindavid
Created September 9, 2010 18:55
Show Gist options
  • Save baldwindavid/572329 to your computer and use it in GitHub Desktop.
Save baldwindavid/572329 to your computer and use it in GitHub Desktop.
# add a layer of abstraction || obfuscation!
module Somethingable
def self.make(&block)
begin
return true if block.call
rescue
return false
end
end
end
class Date
def self.parseable?(str)
Somethingable.make { parse(str) }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment