Class: ActivePath::ViewInjection::Configuration::Partial

Inherits:
Object
  • Object
show all
Defined in:
lib/active_path/view_injection/configuration/partial.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePartial

Returns a new instance of Partial.



8
9
10
# File 'lib/active_path/view_injection/configuration/partial.rb', line 8

def initialize
  @attachments = []
end

Instance Attribute Details

#attachmentsObject (readonly)

Returns the value of attribute attachments.



6
7
8
# File 'lib/active_path/view_injection/configuration/partial.rb', line 6

def attachments
  @attachments
end

Instance Method Details

#with(partial_name) ⇒ Object



12
13
14
15
# File 'lib/active_path/view_injection/configuration/partial.rb', line 12

def with(partial_name)
  @attachments << Attachment.new(partial_name)
  @attachments.last
end