This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def first_question | |
puts "Would you like to start a new session?" | |
answer = gets.chomp.downcase | |
if answer == "yes" | |
new_session | |
else | |
puts "Ok. Would you like to review a previous session?" | |
prev_session = gets.chomp.downcase | |
if prev_session == "yes" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LIGHT = 5.00 | |
MEDIUM = 7.50 | |
BOLD = 9.75 | |
def coffee_selection | |
puts "How many packs of LIGHT would the customer like?" | |
light_total = LIGHT*gets.chomp.to_f | |
puts "How many packs of MEDIUM would the customer like?" | |
medium_total = MEDIUM*gets.chomp.to_f | |
puts "How many packs of BOLD would the customer like?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAX = 1000 | |
NUM = rand(1000) | |
puts "Guess a number between 0 and #{MAX}" | |
guess = gets.chomp.to_i | |
def guess_again | |
guess = gets.chomp.to_i | |
if guess == NUM | |
puts "CORRECT!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create mode 100644 config/initializers/backtrace_silencers.rb | |
commit 620ea8f6c9313a120735015c1b2e8abe61439055 | |
Author: Justus Danny Eapen Jr <[email protected]> | |
Date: Fri Nov 15 10:22:53 2013 -0500 | |
First Commit | |
(END) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Product | |
@@all = [] | |
def initialize (item, price) | |
@item = item | |
@price = price | |
end | |
def price | |
@price |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCORES = [75, | |
100, | |
85, | |
65, | |
84, | |
87, | |
95] | |
def average | |
sum = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
salutations = [ | |
'Mr.', | |
'Mrs.', | |
'Mr.', | |
'Dr.', | |
'Ms.' | |
] | |
first_names = [ | |
'John', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pry' | |
class Product | |
@@all = [] | |
def initialize (item, price) | |
@item = item | |
@price = price | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
word_bank = ["Array", "Hash", "Ruby", "Rails", "Framework", "Werewolf", "Mafia", "Koans", "Launch", "Class", "Object", "Database", "Schema", "Spock", "Method", "Constant", "Higgs-Boson", "Regulatory Capture", "git", "Gist", "Github", "Gem", "Directory", "Binary", "Backchannel", "Socket", "Bootstrap", "Javascript", "CSS", "HTML", "Markdown", "initialize", "attribute", "Airplay", "User Story", "Acceptance Criteria", "Batman", "Java", "Language", "Mirepoix", "Perl", "Python", "Recursive Loop",] | |
secret_word = word_bank[rand(word_bank.length)] | |
secret_word = secret_word.downcase | |
blanked_word = "" | |
array_word = secret_word.each_char.to_a | |
array_word.each do |char| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
departures = | |
{"Train 1" => 2, | |
"Train 2" => 5, | |
"Train 3" => 7.5, | |
"Train 4" => 8.5, | |
"Train 5" => 9, | |
"Train 6" => 10, | |
"Train 7" => 11.5, | |
"Train 8" => 13.5, | |
"Train 9" => 14.5, |
OlderNewer