Class: Module
Instance Method Summary collapse
-
#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.
Instance Method Details
#runtime_eval(&block) ⇒ Object
creates instance with module included and runs the code MainHelper.runtime_eval do
@session_city = City.first
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 |