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 following formula is used to calculate the fixed monthly payment | |
# (payment) required to fully amortize a loan of "loan" dollars over a term of | |
# "duration" months at a monthly interest rate of "interest". | |
# [If the quoted rate is 6%, for example, "interest" is .06/12 or .005] | |
def fixed_monthly_payment(loan, interest, duration) | |
payment = loan * (interest * (1 + interest)**duration) / ((1 + interest)**duration - 1) | |
payment.round(2) | |
end | |
def number?(number) |
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
set nocompatible | |
filetype off | |
if has("autocmd") | |
filetype indent plugin on | |
endif | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#rc() | |
set tags+=gems.tags |
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 spacer | |
puts "------------------------------------------------------------------------------------" | |
end | |
def blank | |
puts "" | |
end | |
puts "the string method" | |
blank |
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
Style/MethodCallParentheses: | |
Enabled: false | |
Description: 'Do not use parentheses for method calls with no arguments.' | |
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens' | |
Style/BracesAroundHashParameters: | |
Enabled: false | |
EnforcedStyle: no_braces | |
SupportedStyles: | |
# The `braces` style enforces braces around all method parameters that are |
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
<!doctype html> | |
<html lang="en-US"> | |
<head> | |
<title></title> | |
<meta charset="UTF-8" /> | |
</head> | |
<body> | |
</body> | |
</html> |
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 Series | |
def initialize(string) | |
@string = string | |
end | |
def string_to_array | |
@string.split('').map(&:to_i) | |
end | |
def fetch_slices(size, string_array) |
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
guard :minitest do | |
watch(%r{^(.*)\/?test_(.*)\.rb$}) | |
watch(%r{^(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" } | |
watch(%r{^test_helper\.rb$}) { 'test' } | |
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
source 'https://rubygems.org' | |
group :development do | |
gem 'guard' | |
gem 'guard-minitest' | |
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
set nocompatible | |
filetype off | |
if has("autocmd") | |
filetype indent plugin on | |
endif | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#rc() | |
set tags+=gems.tags |
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 Board | |
def self.transform(board) | |
@rows = [] | |
explode_rows(board) | |
validate_rows | |
process_rows | |
reform_rows | |
end | |
def self.validate_rows |