lib/render_anywhere.rb in render_anywhere-0.0.7 vs lib/render_anywhere.rb in render_anywhere-0.0.8

- old
+ new

@@ -6,10 +6,22 @@ module RenderAnywhere def render(*args) rendering_controller.render_to_string(*args) end - + def set_render_anywhere_helpers(*args) + args.each do |helper_name| + rendering_controller.class_eval do + helper helper_name.to_s.constantize + end + end + end + def set_instance_variable(var, value) + rendering_controller.class_eval do + attr_accessor :"#{var}" + end + rendering_controller.public_send("#{var}=", value) + end def rendering_controller @rendering_controller ||= RenderAnywhere::RenderingController.new end end