Skip to content

Instantly share code, notes, and snippets.

@atkolkma
atkolkma / gist:8024287
Created December 18, 2013 15:31
Sample carfax report
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@atkolkma
atkolkma / gist:7516896
Last active December 28, 2015 14:48
rspec test for output of fizzbuzz()
require "~/development/tested/lib/fizzbuzz.rb"
describe FizzBuzz do
describe '#fizzbuzzer' do
it "accurately outputs for various integers" do
expect(fizzbuzzer(9)).to eql("Fizz")
end
end
end
@atkolkma
atkolkma / gist:6580427
Last active December 23, 2015 04:29 — forked from anonymous/gist:6580417
class FizzBuzz
require 'json'
def initialize (input)
@max = input
end
def modulo_parse (n)
if n % 15 == 0
@atkolkma
atkolkma / gist:6545792
Last active December 22, 2015 23:19
Working on step 4 of Fizz Buzz here. But whenever I modify the output of the fizzbuzzer method with the as_text method I get an undefined error
class FizzBuzz
def as_text (input)
input.to_string
end
def fizzbuzzer (limit)
(1..limit).map do |n|
if n % 15 == 0
"fizzbuzz"