Method: String#is_upper?
- Defined in:
- lib/thefox-ext/ext/string.rb
#is_upper? ⇒ Boolean
Is a String only made of upper-case charaters.
17 18 19 20 |
# File 'lib/thefox-ext/ext/string.rb', line 17 def is_upper? r = 'A'..'Z' self.split('').keep_if{ |c| r.include?(c) }.count == self.length end |