Class: String

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

Instance Method Summary collapse

Instance Method Details

#classifyObject



36
37
38
# File 'lib/checker/core_ext.rb', line 36

def classify
  CoreExt.classify(self)
end

#constantizeObject



32
33
34
# File 'lib/checker/core_ext.rb', line 32

def constantize
  CoreExt.constantize(self)
end

#ends_with?(patt) ⇒ Boolean

Returns:

  • (Boolean)


44
45
46
47
# File 'lib/checker/core_ext.rb', line 44

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

#underscoreObject



40
41
42
# File 'lib/checker/core_ext.rb', line 40

def underscore
  CoreExt.underscore(self)
end