Module: Rib::LastValue

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

Defined Under Namespace

Modules: Imp

Instance Attribute Summary collapse

Attributes included from Plugin

#disabled

Instance Method Summary collapse

Methods included from Plugin

const_missing, disable, disabled?, enable, enabled?, extended

Instance Attribute Details

#last_exceptionObject (readonly)

Returns the value of attribute last_exception.



8
9
10
# File 'lib/rib/core/last_value.rb', line 8

def last_exception
  @last_exception
end

#last_valueObject (readonly)

Returns the value of attribute last_value.



8
9
10
# File 'lib/rib/core/last_value.rb', line 8

def last_value
  @last_value
end

Instance Method Details



16
17
18
19
20
# File 'lib/rib/core/last_value.rb', line 16

def print_eval_error err
  return super if LastValue.disabled?
  @last_exception = err
  super
end


10
11
12
13
14
# File 'lib/rib/core/last_value.rb', line 10

def print_result result
  return super if LastValue.disabled?
  @last_value = result
  super
end