Module: Ripl::Hirb

Defined in:
lib/ripl/hirb.rb

Instance Method Summary collapse

Instance Method Details

#before_loopObject



4
5
6
7
# File 'lib/ripl/hirb.rb', line 4

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

#format_result(result) ⇒ Object



9
10
11
12
# File 'lib/ripl/hirb.rb', line 9

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