Module: WindowRails::Windows
- Defined in:
- lib/window_rails/windows.rb
Overview
Loads windowing helper methods into class
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/window_rails/windows.rb', line 7 def self.included(base) WindowRails::Generators.instance_methods(false).each do |method| base.class_eval do def _window_rails_holder @_window_rails_holder ||= WindowRails::Holder.new end define_method method do |*args| _window_rails_holder.context = self _window_rails_holder.send(method, *args) _window_rails_holder.window_flush.html_safe end end end end |