Class: ActivePath::ViewInjection::Configuration::Partial
- Inherits:
-
Object
- Object
- ActivePath::ViewInjection::Configuration::Partial
- Defined in:
- lib/active_path/view_injection/configuration/partial.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Object
readonly
Returns the value of attribute attachments.
Instance Method Summary collapse
-
#initialize ⇒ Partial
constructor
A new instance of Partial.
- #with(partial_name) ⇒ Object
Constructor Details
#initialize ⇒ Partial
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
#attachments ⇒ Object (readonly)
Returns the value of attribute attachments.
6 7 8 |
# File 'lib/active_path/view_injection/configuration/partial.rb', line 6 def @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 |