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
#!/usr/bin/env ruby | |
# Install capybara and selenium-webdriver gems | |
# | |
# $ gem install capybara | |
# $ gem install selenium-webdriver | |
# | |
# Install chromedriver | |
# | |
# $ brew install chromedriver |
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 Scrabble | |
attr_reader :string, :scores, :multiplier | |
def initialize(string, multiplier = :single) | |
@string = string | |
@multiplier = multiplier | |
end | |
def score | |
score = 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
class Fixnum | |
VERSION = 1 | |
def to_roman | |
numeral = "" | |
numeral << numeral_thousands | |
numeral << numeral_hundreds | |
numeral << numeral_tens | |
numeral << numeral_ones | |
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 SecretSanta | |
attr_accessor :people | |
def initialize(file) | |
@people = [] | |
File.new(file).each_line do |line| | |
first, last = line.split(' ') | |
@people << Person.new(first, last) | |
end | |
assign_santas |