Sha256: 32d36b1b56b0ca5cfcbde0d0548b445690f28e95d673a313dd636669a69cd39b

Contents?: true

Size: 941 Bytes

Versions: 46

Compression:

Stored size: 941 Bytes

Contents

# frozen_string_literal: true

# Awesome print
begin
  require 'awesome_print'

  AwesomePrint.irb!
rescue LoadError => err
  warn "Couldn't load awesome_print: #{err}"
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 => err
    warn "Could not load: #{railsrc_path} because of #{err}"
  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

46 entries across 46 versions & 9 rubygems

Version Path
active_object-5.8.11 .irbrc
active_memoize-2.0.2 .irbrc
active_memoize-2.0.1 .irbrc
active_memoize-2.0.0 .irbrc
active_memoize-1.1.1 .irbrc
active_memoize-1.1.0 .irbrc
active_memoize-1.0.3 .irbrc
active_memoize-1.0.2 .irbrc
active_memoize-1.0.1 .irbrc
active_redis_stats-0.1.3 .irbrc
active_concurrency-0.1.0 .irbrc
active_frontend-17.1.4 .irbrc
active_frontend-17.1.3 .irbrc
active_frontend-17.1.2 .irbrc
active_frontend-17.1.1 .irbrc
active_frontend-17.1.0 .irbrc
active_frontend-17.0.4 .irbrc
active_frontend-17.0.3 .irbrc
active_object-5.8.10 .irbrc
active_object-5.8.9 .irbrc