Skip to content

Instantly share code, notes, and snippets.

View mcsuth's full-sized avatar

Seimith Suth mcsuth

View GitHub Profile
require './bowling'
describe Bowling do
describe '#score' do
let(:game) { Bowling.new }
it 'should start at 0' do
game.score.should == 0
end
@mcsuth
mcsuth / gist:6735018
Last active December 24, 2015 03:09 — forked from featherart/gist:6734826
Boo
# ,o888888o. 8 8888 88 8 8888 8888888888',8888'
# . 8888 `88. 8 8888 88 8 8888 ,8',8888'
# ,8 8888 `8b 8 8888 88 8 8888 ,8',8888'
# 88 8888 `8b 8 8888 88 8 8888 ,8',8888'
# 88 8888 88 8 8888 88 8 8888 ,8',8888'
# 88 8888 `8. 88 8 8888 88 8 8888 ,8',8888'
# 88 8888 `8,8P 8 8888 88 8 8888 ,8',8888'
# `8 8888 ;8P ` 8888 ,8P 8 8888 ,8',8888'
# ` 8888 ,88'8. 8888 ,d8P 8 8888 ,8',8888'
puts "would you lke to start a contact list?"
response = gets.chomp
hash = {}
while response == "y"
puts "give me name"
name = gets.chomp
puts "number"
number = gets.chomp
hash[name] = number
my_hash = {"jackie"=>"I like bowling", "Luke"=>"likes riding his bike", "imogen"=>"I have a cold", "sara"=>"I ride bart"}
puts "Want to start a hash?"
response = gets.chomp
while response == "y"
puts "Give us your name"
key = gets.chomp
# User list holds a list of names
# and their shopping items
# Expecting [name, [item1, item2]] style
user_list = []
# Prompting the user if they want to start
puts "Would you like to start a nested list?[y/n]"
response = gets.chomp
# Building Ruby Familiarity
# In this exercise you will take a first look at some common commands in Ruby
# The idea here is to build familiary with Ruby syntax
# This will likely be the first time you've seen some of these commands
# Just type them in and see the displayed output
# Steps:
# 1. Open up a new terminal window
# 2. Launch irb