This file contains 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
$:.unshift(File.dirname(__FILE__)) | |
require 'spec_helper' | |
module BowlongGameMacro | |
class BowlongGamePlayer | |
def initialize | |
@game = Game.new | |
end | |
def roll_spare |
This file contains 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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<title>{Title}{block:PostTitle} / {PostTitle}{/block:PostTitle}</title> | |
<link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}"/> | |
<link rel="Shortcut Icon" type="image/png" href="{Favicon}" /> | |
{block:Description}<meta name="description" content="{MetaDescription}" />{/block:Description} | |
This file contains 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 Array | |
def maps(*methods) | |
methods = [methods].flatten | |
self.map do |node| | |
methods.inject(node) {|result, method| method.call(result) } | |
end | |
end | |
end | |
twice = lambda {|node| node * 2 } |
This file contains 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
ruby -e 'puts $stdin.read.gsub(/method\s+([\w"]*),\s+([\w"]*)/){ "assert #{$2}, #{$1}" }' |
This file contains 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
ruby -e 'puts $stdin.read.gsub(/method\s+([a-zA-Z"]*),\s+([a-z"]*)/){ "assert #{$2}, #{$1}" }' |
This file contains 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
# use escapse squence | |
setopt prompt_subst | |
# prompt | |
local DEFAULT=$'%{\e[01;m%}' | |
local PURPLE=$'%{\e[01;35m%}' | |
local CYAN=$'%{\e[04;36m%}' | |
if [ $TERM = "dumb" ]; then | |
PROMPT="> " |
This file contains 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
escape ^z^t | |
autodetach on | |
defscrollback 10000 | |
shell -$SHELL | |
shelltitle "$ |zsh" | |
startup_message off | |
bind s # disable keyboard lock |
This file contains 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
# Generated by tortoisehg-config | |
[ui] | |
editor="C:\Program Files\Vim\vim72\gvim.exe" -c ":set fileencoding=cp932" | |
ignore=c:\home\hgignore.ini | |
[extensions] | |
hgext.win32text= | |
hgext.win32mbcs= | |
hgext.extdiff = | |
rebase = |
This file contains 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
# -*- encoding: UTF-8 -*- | |
describe "Money" do | |
it "3000.yen で Moneyオブジェクトが生成できること" do | |
3000.yen.should == Money.create(3000, :yen) | |
end | |
describe "比較演算" do | |
it " == できること " do | |
(1000.yen == 1000.yen).should be_true | |
(1000.yen == 1000.dollar).should be_false |
This file contains 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
# -*- encoding: UTF-8 -*- | |
describe "Money" do | |
it "3000.yen で Moneyオブジェクトが生成できること" do | |
3000.yen.should == Money.create(3000, :yen) | |
end | |
describe "比較演算" do | |
it " == できること " do | |
(1000.yen == 1000.yen).should be_true | |
(1000.yen == 1000.dollar).should be_false |