Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/zigzagcase/string.rb
Instance Method Summary collapse
Instance Method Details
#zigzagcase ⇒ Object
2 3 4 5 |
# File 'lib/zigzagcase/string.rb', line 2 def zigzagcase modifiers = %i[upcase downcase].cycle self.chars.map{ |char| char.send(modifiers.next) }.join end |