method
block_to_function
v2.1.0 -
Show latest stable
- Class:
ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods
block_to_function(block)private
No documentation available.
# File actionpack/lib/action_view/helpers/prototype_helper.rb, line 1002
def block_to_function(block)
generator = self.class.new(@context, &block)
literal("function() { #{generator.to_s} }")
end