Module: Rib::Underscore

Extended by:
Plugin
Defined in:
lib/rib/core/underscore.rb

Constant Summary collapse

IVAR =
{:_  => :@__rib_result__,
:__ => :@__rib_exception__}

Instance Attribute Summary

Attributes included from Plugin

#disabled

Instance Method Summary collapse

Methods included from Plugin

disable, disabled?, enable, enabled?, extended

Instance Method Details

#before_loopObject

————— Rib API —————



13
14
15
16
17
18
# File 'lib/rib/core/underscore.rb', line 13

def before_loop
  return super if Underscore.disabled?
  eliminate_warnings
  inject_inspecter
  super
end


26
27
28
29
30
# File 'lib/rib/core/underscore.rb', line 26

def print_eval_error err
  return super if Underscore.disabled?
  bound_object.instance_variable_set(:@__rib_exception__, err)
  super
end


20
21
22
23
24
# File 'lib/rib/core/underscore.rb', line 20

def print_result result
  return super if Underscore.disabled?
  bound_object.instance_variable_set(:@__rib_result__, result)
  super
end