Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/matlock/ext/string.rb
Instance Method Summary collapse
Instance Method Details
#downcase? ⇒ Boolean
10 11 12 |
# File 'lib/matlock/ext/string.rb', line 10 def downcase? return !self.index(/^[a-z]+$/).nil? end |
#titlecase? ⇒ Boolean
2 3 4 |
# File 'lib/matlock/ext/string.rb', line 2 def titlecase? return !self.index(/^[A-Z].+[a-z]/).nil? end |
#upcase? ⇒ Boolean
6 7 8 |
# File 'lib/matlock/ext/string.rb', line 6 def upcase? return !self.index(/^[A-Z]+$/).nil? end |