Sha256: ad21cbaa6c66d2a384ec58ea716a386de7e7f4a965831212787e5b90372ac719
Contents?: true
Size: 477 Bytes
Versions: 1
Compression:
Stored size: 477 Bytes
Contents
require "words_with_dave/version" module WordsWithDave def self.reversify(str, radix) 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.sample arr[i] = letter.send(this_case) end arr.join("") end def self.spacify(str, spaces = 0) spaces.times do str = str.split("").join(" ") end str end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
words_with_dave-1.0.0 | lib/words_with_dave.rb |