Skip to content

Instantly share code, notes, and snippets.

View quackhouse's full-sized avatar

Morgan Neiman quackhouse

View GitHub Profile
@quackhouse
quackhouse / hashbook.rb
Last active December 24, 2015 01:19
HashBook - Beginnings of a Facebook-like (but super basic) social network. Storing capabilities for username, name, password, etc. Search function and ability to store a message to a user's "wall". No options for display of message, while loops in progress. Flow is not circular (no way to get back to home menu).
def ask(question)
# Defines method for asking questions and receiving input.
puts question
gets.chomp!
end
def get_name
puts "What is your full name?"
full_name = gets.chomp!
end
@quackhouse
quackhouse / calculator.rb
Created September 25, 2013 14:36
Ruby Calculator
def getNumbers(workingArray)
# Method to take multiple integers as input from user.
puts "Please enter the numbers you'd like me to use. Type 'done' when you're finished."
nextnum = 0
# Creates nextnum as variable.
while nextnum != "done"
nextnum = gets.chomp!
if nextnum == "done"
puts "Calculating!"
elsif nextnum != "0" && nextnum.to_i == 0