module SupBro
Constants
- VERSION
Public Class Methods
casify()
click to toggle source
# File lib/sup_bro.rb, line 8 def self.casify to_case = [:upcase, :downcase] arr = str.split("") arr.each_with_index do |letter, i| this_case = to_case[rand(2)] arr(i) = letter.send(this_case) end end
reversify(str)
click to toggle source
# File lib/sup_bro.rb, line 4 def self.reversify(str) str.split('').reverse.join('') end
spacify(str, spaces = 0)
click to toggle source
# File lib/sup_bro.rb, line 17 def self.spacify(str, spaces = 0) new_string = str spaces.times do new_string = newstring.split(""). join(" ") end new_string end