Top Level Namespace
Defined Under Namespace
Modules: Deputy Classes: Scout
Instance Method Summary collapse
Instance Method Details
#eval_and_fetch_constants(x) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/deputy.rb', line 6 def eval_and_fetch_constants(x) old = Module.constants.map{|c| c.to_s} eval(x) new = (Module.constants.map{|c| c.to_s} - old) new = new.select{|c| c.to_s =~ /^TEMP/ } # do not fetch required libs, just user-defined new.map{|c| const_get(c) } end |