Class: JQueryOnRails::Helpers::JQueryHelper::JavaScriptGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/jquery_on_rails/helpers/jquery_helper.rb

Overview

Mostly copied from Rails 3 PrototypeHelper

Defined Under Namespace

Modules: CompatibilityMethods, GeneratorMethods

Instance Method Summary collapse

Constructor Details

#initialize(context, &block) ⇒ JavaScriptGenerator

:nodoc:



78
79
80
81
82
83
84
# File 'lib/jquery_on_rails/helpers/jquery_helper.rb', line 78

def initialize(context, &block) #:nodoc:
  @context, @lines = context, []
  include_helpers_from_context
  @context.with_output_buffer(@lines) do
    @context.instance_exec(self, &block)
  end
end