Sha256: 92a3fb31d2e0b0fbf3b46502d3febbdbfabccf6baa268198fa4c63207c2c2b01
Contents?: true
Size: 933 Bytes
Versions: 18
Compression:
Stored size: 933 Bytes
Contents
# frozen_string_literal: true # Awesome print begin require 'awesome_print' AwesomePrint.irb! rescue LoadError => e warn "Couldn't load awesome_print: #{e}" end # IRB require 'irb/completion' ARGV.concat %w[--readline --prompt-mode simple] IRB.conf[:PROMPT_MODE] = :SIMPLE IRB.conf[:EVAL_HISTORY] = 1000 IRB.conf[:SAVE_HISTORY] = 1000 IRB.conf[:HISTORY_FILE] = File.expand_path('.irbrc_history') # Rails railsrc_path = File.expand_path('.irbrc_rails') if (ENV['RAILS_ENV'] || defined?(Rails)) && File.exist?(railsrc_path) begin load railsrc_path rescue Exception => e warn "Could not load: #{railsrc_path} because of #{e}" end end # Object class Object def interesting_methods case self.class when Class then public_methods.sort - Object.public_methods when Module then public_methods.sort - Module.public_methods else public_methods.sort - Object.new.public_methods end end end
Version data entries
18 entries across 18 versions & 3 rubygems