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 numerals_subtraction(int) | |
values = %w(M D C L X V I) | |
roman_num = "" | |
values = {"M" => 1000, "D" => 500, "C" => 100, "L" => 50, "X" => 10, "V" => 5, "I" => 1} | |
values.keys.each do |i| | |
if (int % values[i]) then |
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 GuessingGame | |
def initialize(answer) | |
@answer = answer | |
end | |
def guess(guess) | |
@guess = guess | |
if guess > @answer | |
puts "high" | |
return :high |
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
//The Jasmine test. | |
describe("A suite", function() { | |
var addFriendButton; | |
var removeFriendButton; | |
var contacts; | |
beforeEach(function() { | |
addFriendButton = document.createElement("button"); | |
document.body.appendChild(addFriendButton); | |
addFriendButton.setAttribute("id", "addFriendButton"); |
NewerOlder