Sha256: 86218996adb3c05dccce9dc3c908b069bbb466f5c42259ece6d8a9fb2603bad4

Contents?: true

Size: 577 Bytes

Versions: 23

Compression:

Stored size: 577 Bytes

Contents

require 'rib'

module Rib::Hirb
  extend Rib::Plugin
  Shell.use(self)

  # --------------- Rib API ---------------

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

begin
  Rib.silence{
    require 'hirb'
    ::Hirb.enable
  }
rescue LoadError => e
  Rib.warn("Error: #{e}"                              ,
           "Please install hirb to use hirb plugin:\n",
           "    gem install hirb\n"                   ,
           "Or add hirb to Gemfile if that's the case")
  Rib::Hirb.disable
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rib-1.5.1 lib/rib/extra/hirb.rb
rib-1.5.0 lib/rib/extra/hirb.rb
rib-1.4.0 lib/rib/extra/hirb.rb
rib-1.3.1 lib/rib/extra/hirb.rb
rib-1.3.0 lib/rib/extra/hirb.rb
rib-1.2.91 lib/rib/extra/hirb.rb
rib-1.2.9 lib/rib/extra/hirb.rb
rib-1.2.8 lib/rib/extra/hirb.rb
rib-1.2.7 lib/rib/extra/hirb.rb
rib-1.2.6 lib/rib/extra/hirb.rb
rib-1.2.5 lib/rib/extra/hirb.rb
rib-1.2.4 lib/rib/extra/hirb.rb
rib-1.2.3 lib/rib/extra/hirb.rb
rib-1.2.2 lib/rib/extra/hirb.rb
rib-1.2.1 lib/rib/extra/hirb.rb
rib-1.2.0 lib/rib/extra/hirb.rb
rib-1.1.6 lib/rib/extra/hirb.rb
rib-1.1.5 lib/rib/extra/hirb.rb
rib-1.1.4 lib/rib/extra/hirb.rb
rib-1.1.3 lib/rib/extra/hirb.rb