Sha256: 145c17642838271d06b41b5989e3c70716b036ef932b8beac54b7b8b904905bd
Contents?: true
Size: 518 Bytes
Versions: 1
Compression:
Stored size: 518 Bytes
Contents
require "wordify_wulfman97/version" module WordifyWulfman97 def self.reversify(str) str.split("").reverse.join("") end def self.casify(str) 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 arr.join("") end def self.spacify(str, spaces = 0) new_string = str spaces.times do new_string = new_string.split("").join(" ") end new_string end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wordify_wulfman97-1.0.0 | lib/wordify_wulfman97.rb |