Sha256: 0727fc559889bdd6541918818ae0c1329cf5ce70e5e4ad7268773dbf4b81ac22

Contents?: true

Size: 673 Bytes

Versions: 4

Compression:

Stored size: 673 Bytes

Contents

def output_concat( text )
  if self.respond_to?(:is_haml?) && is_haml?
    haml_concat(text)
  elsif !Aerogel::Render::OutputBuffer.buffer.nil? # has_erb_buffer?
    Aerogel::Render::OutputBuffer.buffer.concat text
  else # theres no template to concat, return the text directly
    text
  end
end

def output_capture( inner_block = nil, &block )
  inner_block = block if inner_block.nil?
  if self.respond_to?(:is_haml?) && is_haml? && (block_is_haml?(inner_block) rescue false)
    # haml
    capture_haml(nil, &block)
  elsif Aerogel::Render::OutputBuffer.block_is_erb? block
    # erb
    Aerogel::Render::OutputBuffer.capture( &block )
  else
    block.call
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
aerogel-core-1.4.12 app/helpers/output_buffer.rb
aerogel-core-1.4.11 app/helpers/output_buffer.rb
aerogel-core-1.4.10 app/helpers/output_buffer.rb
aerogel-core-1.3.0 app/helpers/output_buffer.rb