require "wordify_barela/version" module WordifyBarela def self.reversify(str) reversed_string = '' (str.length-1).downto(0).each do |n| reversed_string << str[n] end reversed_string end def self.caseify(str) the_case = [:downcase, :upcase] letters = str.split("") letters.each_with_index do |letter, i| this_case = the_case.sample letters[i] = letter.send(this_case) end letters.join('') end def self.spaceify(str, spaces = 0) new_string = str spaces.times { new_string = new_string.split("").join(" ") } new_string end end