Class: Module

Inherits:
Object show all
Defined in:
lib/overload/module.rb

Instance Method Summary collapse

Instance Method Details

#runtime_eval(&block) ⇒ Object

creates instance with module included and runs the code MainHelper.runtime_eval do

@session_city = City.first
header_top_menu

end



7
8
9
# File 'lib/overload/module.rb', line 7

def runtime_eval &block
  Class.new.send(:include, self).new.instance_exec &block
end