Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/matlock/ext/string.rb

Instance Method Summary collapse

Instance Method Details

#downcase?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/matlock/ext/string.rb', line 10

def downcase?
  return !self.index(/^[a-z]+$/).nil?
end

#titlecase?Boolean

Returns:

  • (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

Returns:

  • (Boolean)


6
7
8
# File 'lib/matlock/ext/string.rb', line 6

def upcase?
  return !self.index(/^[A-Z]+$/).nil?
end