Sha256: 2757c410cee6458ef022a8a28f4fe9366813c44c191f1a317fe75fe28cd40ec6

Contents?: true

Size: 281 Bytes

Versions: 3

Compression:

Stored size: 281 Bytes

Contents

require 'hirb'

module Ripl::Hirb
  def before_loop
    super
    Hirb.enable(Ripl.config[:hirb] || {})
  end

  def format_result(result)
    return super if !Hirb::View.enabled?
    Hirb::View.view_or_page_output(result) || super
  end
end

Ripl::Shell.send :include, Ripl::Hirb

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hirb-0.4.1 lib/ripl/hirb.rb
hirb-0.4.0 lib/ripl/hirb.rb
hirb-0.3.6 lib/ripl/hirb.rb