Class: ActivePath::Subscribers::ViewInjection

Inherits:
Subscriber
  • Object
show all
Includes:
Conditions::Conditional
Defined in:
lib/active_path/subscribers/view_injection.rb

Instance Attribute Summary

Attributes inherited from Subscriber

#buffer, #context, #options

Instance Method Summary collapse

Methods included from Conditions::Conditional

#condition_match?, #conditions_match?, #hash_match?, #proc_match?

Methods inherited from Subscriber

#call, #partial

Instance Method Details

#performObject



8
9
10
11
12
13
14
15
16
# File 'lib/active_path/subscribers/view_injection.rb', line 8

def perform
  prepend_attachments.each do |attachment|
    buffer.prepend(render_attachment(attachment))
  end

  append_attachments.each do |attachment|
    buffer.concat(render_attachment(attachment))
  end
end