Solutions for Ruby Golf
$ ./_runner.sh
1. Fizz Buzz: 74 characters
def fizzbuzz(n)(n%15==0?'FizzBuzz':n%3==0?'Fizz':n%5==0?'Buzz':n).to_s end
4 tests: Pass, Pass, Pass, Pass
2. Caesar Cipher: 47 characters
def caeser(s,n)s.gsub(/./){|c|(c.ord+n).chr}end
2 tests: Pass, Pass
This one seems like it probably has lots of edge cases that should be specified,
but this satisfies the given example and works both forwards and backwards.
3. Rock Paper Scissors Game: 104 characters
def play(s)o=%w(Rock Paper Scissors Rock);m=rand 3;"#{o[m]},#{o[m+1]==s ?:Win:o[m]==s ?:Draw: :Lose}"end
4 tests: Pass, Pass, Pass, Pass
4. String Counter: 46 characters
def count(h,n)h.upcase.scan(n.upcase).size end
2 tests: Pass, Pass
1. Swingers Function: 49 characters
def swingers(s)f,l=s.transpose;f.zip l.rotate end
1 tests: Pass
The directions didnt specify randomness as a requirement,
this algorithm is simple and deterministic but easy to understand.