Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (20 sloc) 0.533 kB
# vim FTW
Pry.config.editor = 'vim'
# Toys methods
# See https://gist.github.com/807492
def Array.toy(n=10, &block)
block_given? ? Array.new(n,&block) : Array.new(n) {|i| i+1}
end
def Hash.toy(n=10)
Array.toy(n).zip(Array.toy(n){|c| (96+(c+1)).chr}).to_h
end
if defined?(Rails) && Rails.env
require 'logger'
if defined?(ActiveRecord)
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.clear_active_connections!
end
if defined?(Sequel)
Sequel::Model.loggers << Logger.new(STDOUT)
end
end
Jump to Line
Something went wrong with that request. Please try again.