Skip to content

Instantly share code, notes, and snippets.

View rplugge's full-sized avatar

Robert Plugge rplugge

View GitHub Profile
@rplugge
rplugge / app.rb
Last active August 29, 2015 14:22
Level 0 - Rock Paper Scissors
require_relative "rock_paper_scissors.rb"
answers = ["Rock", "Paper", "Scissors"]
puts "Play to best of? (1, 3, 5)"
best_of = gets.chomp.to_i
puts "Let's play some Rock, Paper, Scissors!"
puts "\n Player 1, what is your name?"
player1_name = gets.chomp
@rplugge
rplugge / ruby.rb
Last active August 29, 2015 14:22
Random Help - 06-04
class Checksplitter
#writing a getter method
attr_reader :meal_cost, :tip_percentage, :number_of_people
def initialize(meal_cost, tip_percentage, number_of_people)
@meal_cost = meal_cost.to_f
@tip_percentage = tip_percentage.to_f
@number_of_people = number_of_people.to_i
end
@rplugge
rplugge / essay.markdown
Last active August 29, 2015 14:22
Dinnerclub Explanation

#Dinnerclub

(Entire file found here - https://gist.github.com/rplugge/79530435e2b58144fe13)

I needed to build a program the could do 2 main things; split a check, and store information about dinner club events.

##Checksplitter

The class ‘Checksplitter’ is fairly simple. I require 3 attributes to split the check.

@rplugge
rplugge / day3_stretches_dinnerclub.rb
Last active August 29, 2015 14:22
Day 3- Stretches
class Checksplitter
#writing a getter method
attr_reader :meal_cost, :tip_percentage, :number_of_people
def initialize(meal_cost, tip_percentage, number_of_people)
@meal_cost = meal_cost.to_f
@rplugge
rplugge / some_thing_yadda_yadda.rb
Last active August 29, 2015 14:22
Day 3 - Checksplitter/Dinnerclub/App
class Checksplitter
#writing a getter method
attr_reader :meal_cost, :tip_percentage, :number_of_people
def initialize(meal_cost, tip_percentage, number_of_people)
@meal_cost = meal_cost.to_f
@tip_percentage = tip_percentage.to_f
@number_of_people = number_of_people.to_i
end
class Checksplitter
def initialize(total_cost, people_number, tip_percent)
@total_cost = total_cost.to_f
@people_number = people_number.to_i
@tip_percent = tip_percent.to_f
end
def people_number
@people_number
end
@rplugge
rplugge / Dinner Split
Created June 1, 2015 19:48
Dinner Split
class Checksplitter
def initialize(total_cost, people_number, tip_percent)
@total_cost = total_cost.to_f
@people_number = people_number.to_i
@tip_percent = tip_percent.to_f
end
def people_number
@people_number
end