module WordifyWright

Constants

VERSION

Public Class Methods

casify(str) click to toggle source
# File lib/wordify_wright.rb, line 9
def self.casify(str)
  (0..(str.length-1)).map{ |n| str[n].send([:downcase, :upcase].sample) }.join
end
random_day() click to toggle source
# File lib/wordify_wright.rb, line 17
def self.random_day
  ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'].sample
end
reversify(str) click to toggle source
# File lib/wordify_wright.rb, line 5
def self.reversify(str)
  (str.length-1).downto(0).map{ |n| str[n] }.join
end
spacify(str, spaces = 0) click to toggle source
# File lib/wordify_wright.rb, line 13
def self.spacify(str, spaces = 0)
  str.split("").join(" "*spaces)
end