Sha256: 609f3b5164d75dd3b215b6b2fc5240e3f1726ffd4da735840e862bb1b731fcc4

Contents?: true

Size: 263 Bytes

Versions: 4

Compression:

Stored size: 263 Bytes

Contents

class Module
  # creates instance with module included and runs the code
  # MainHelper.runtime_eval do
  #   @session_city = City.first
  #   header_top_menu
  # end
  def runtime_eval &block
    Class.new.send(:include, self).new.instance_exec &block
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lux-fw-0.2.3 ./lib/overload/module.rb
lux-fw-0.2.1 ./lib/overload/module.rb
lux-fw-0.1.35 ./lib/overload/module.rb
lux-fw-0.1.17 ./lib/overload/module.rb