Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/checker/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#constantizeObject



15
16
17
# File 'lib/checker/core_ext.rb', line 15

def constantize
  CoreExt.constantize(self)
end

#ends_with?(patt) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
22
# File 'lib/checker/core_ext.rb', line 19

def ends_with?(patt)
  patt = Regexp.new(Regexp.escape(patt) + "$")
  self.match patt
end