class String

Monkey Patch

Pretty sure this is a bad idea to patch string. mentalized.net/journal/2011/04/14/ruby-how-to-check-if-a-string-is-numeric/

Public Instance Methods

numeric?() click to toggle source
# File lib/greenhat/thing/helpers.rb, line 45
def numeric?
  !Float(self).nil?
rescue StandardError
  false
end
pastel(*args) click to toggle source
# File lib/greenhat/color.rb, line 20
def pastel(*args)
  GreenHat::Color.decorate(args.unshift(self))
end
unpastel() click to toggle source
# File lib/greenhat/color.rb, line 24
def unpastel
  GreenHat::Color.pastel.strip self
end