Module: Lector::Types::Code

Defined in:
lib/lector/types.rb

Instance Method Summary collapse

Instance Method Details

#valObject



16
17
18
19
20
21
22
# File 'lib/lector/types.rb', line 16

def val
  if $_LECTOR_READ_EVAL
    eval(to_s.slice(3..-2))
  else
    raise RuntimeError, "Evaluation isn't allowed if :read_eval is false"
  end
end