Sha256: bcdffccacb308a8aa4d8051caedb9c6fb92c87757db19634a3dff551596b034c

Contents?: true

Size: 937 Bytes

Versions: 5

Compression:

Stored size: 937 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 => 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

5 entries across 5 versions & 3 rubygems

Version Path
active_frontend-17.2.0 .irbrc
active_object-5.11.0 .irbrc
active_object-5.10.0 .irbrc
active_object-5.9.0 .irbrc
active_memoize-2.0.3 .irbrc