class SocialRails::Helpers::Base
Public Class Methods
new(template, content, scope, config)
click to toggle source
# File lib/social_rails/helpers/base.rb, line 5 def initialize(template, content, scope, config) @template, @content, @scope, @config = template, content, scope, config # @tags ||= [] @tags.each do |tag| eval <<-DEF, nil, __FILE__, __LINE__ + 1 def #{tag}_tag #{tag.classify}.new @template, @content, @scope, @config end DEF end @output_buffer = if defined?(::ActionView::OutputBuffer) ::ActionView::OutputBuffer.new else ActiveSupport::SafeBuffer.new end end
Public Instance Methods
render(&block)
click to toggle source
# File lib/social_rails/helpers/base.rb, line 25 def render(&block) instance_eval(&block) @output_buffer end