Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f34f08bf6e
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (19 sloc) 0.693 kb
# vim
Pry.config.editor = "vim"
# Prompt with ruby version
Pry.prompt = [proc { |obj, nest_level, *| "#{RUBY_VERSION} (#{obj}):#{nest_level} > " }, proc { |obj, nest_level, *| "#{RUBY_VERSION} (#{obj}):#{nest_level} * " }]
%w{map_by_method hirb}.each { |gem| require gem }
# Toys methods
# Stealed from https://gist.github.com/807492
class Array
def self.toy(n=10, &block)
block_given? ? Array.new(n,&block) : Array.new(n) {|i| i+1}
end
end
class Hash
def self.toy(n=10)
Hash[Array.toy(n).zip(Array.toy(n){|c| (96+(c+1)).chr})]
end
end
# loading rails configuration if it is running as a rails console
load File.dirname(__FILE__) + '/.railsrc' if defined?(Rails) && Rails
Jump to Line
Something went wrong with that request. Please try again.