Class: Casing::Underscore
- Inherits:
-
Object
- Object
- Casing::Underscore
- Extended by:
- Casing
- Defined in:
- lib/casing/underscore.rb,
lib/casing/underscore/hash.rb,
lib/casing/underscore/array.rb,
lib/casing/underscore/string.rb
Defined Under Namespace
Class Method Summary collapse
Methods included from Casing
!, call, case?, value_cased?
Class Method Details
.match?(val) ⇒ Boolean
5 6 7 |
# File 'lib/casing/underscore.rb', line 5 def self.match?(val) !!((((val =~ /^[a-z]/) && (val =~ /_/)) || (val =~ /^[a-z]/)) && !(val =~ /[A-Z]/)) end |