Sha256: d04c8783e09c8276a40256c95d50747854eaf4f62008aaf0b2213f8dd7a2bae1

Contents?: true

Size: 554 Bytes

Versions: 22

Compression:

Stored size: 554 Bytes

Contents

begin
  require 'hirb'
rescue LoadError
  # Missing goodies, bummer
end

if defined? Hirb
  # Slightly dirty hack to fully support in-session Hirb.disable/enable toggling
  Hirb::View.instance_eval do
    def enable_output_method
      @output_method = true
      @old_print = Pry.config.print
      Pry.config.print = proc do |*args|
        Hirb::View.view_or_page_output(args[1]) || @old_print.call(*args)
      end
    end

    def disable_output_method
      Pry.config.print = @old_print
      @output_method = nil
    end
  end

  Hirb.enable
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
onotole-2.0.2 templates/dotfiles/.pryrc
onotole-2.0.1 templates/dotfiles/.pryrc
onotole-2.0.0 templates/dotfiles/.pryrc
onotole-1.2.11 templates/dotfiles/.pryrc
onotole-1.2.10 templates/dotfiles/.pryrc
onotole-1.2.9 templates/dotfiles/.pryrc
onotole-1.2.8 templates/dotfiles/.pryrc
onotole-1.2.7 templates/dotfiles/.pryrc
onotole-1.2.6 templates/dotfiles/.pryrc
onotole-1.2.5 templates/dotfiles/.pryrc
onotole-1.2.4 templates/dotfiles/.pryrc
onotole-1.2.3 templates/dotfiles/.pryrc
onotole-1.2.2 templates/dotfiles/.pryrc
onotole-1.2.1 templates/dotfiles/.pryrc
onotole-1.1.21 templates/dotfiles/.pryrc
onotole-1.1.20 templates/dotfiles/.pryrc
onotole-1.1.19 templates/dotfiles/.pryrc
onotole-1.1.18 templates/dotfiles/.pryrc
onotole-1.1.17 templates/dotfiles/.pryrc
onotole-1.1.16 templates/dotfiles/.pryrc