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
| # coding: utf-8 | |
| require 'rspec' | |
| describe Array do | |
| describe '初期化' do | |
| describe '初期値を引数で渡した場合' do | |
| let(:current) { Array.new(2,'hoge') } | |
| context 'Array.new(2, "hoge")' do | |
| it '配列の要素がhogeになっていること' do |
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
| require 'spreadsheet' | |
| require 'csv' | |
| filename = 'excelsample' | |
| file = File.expand_path(File.dirname(__FILE__) + "/" + filename + '.xls') | |
| excel = Spreadsheet.open(file, 'rb') | |
| CSV.open(filename + '.csv', 'wb') do |csv| | |
| excel.worksheets.each do |sheet| |
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
| GEM | |
| remote: https://rubygems.org/ | |
| specs: | |
| actionmailer (3.2.13) | |
| actionpack (= 3.2.13) | |
| mail (~> 2.5.3) | |
| actionpack (3.2.13) | |
| activemodel (= 3.2.13) | |
| activesupport (= 3.2.13) | |
| builder (~> 3.0.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
| CONFIGURE_OPTS="--with-readline-dir=/usr/local --with-gcc=gcc" rbenv install 1.9.3-p385 |
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 :rubygems | |
| gem 'thin' | |
| gem 'rake' | |
| gem 'sinatra-flash', :require => 'sinatra/flash' | |
| gem 'activerecord', '~>3.2.11', :require => 'active_record' | |
| gem 'mysql2' |
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
| padrino g project somethingproject --renderer none --test cucumber rspec --orm activerecord |
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 Dog | |
| def self.inherited(klass) | |
| puts klass.inspect | |
| end | |
| end | |
| class Pochi < Dog | |
| end | |
| #=> "Pochi" |
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
| module Test | |
| at_exit do | |
| puts "program finished" | |
| end | |
| 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
| defutf8 on | |
| defkanji utf-8 | |
| encoding utf-8 utf-8 | |
| defencoding utf-8 | |
| defscrollback 10240 | |
| escape ^j^j | |
| vbell off | |
| hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w" |
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
| defutf8 on | |
| defkanji utf-8 | |
| encoding utf-8 utf-8 | |
| defencoding utf-8 | |
| defscrollback 10240 | |
| escape ^j^j | |
| vbell off | |
| hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w" |