Module: Slotify::Extensions::Base
- Includes:
- SlotCompatability
- Defined in:
- lib/slotify/extensions/base.rb
Instance Attribute Summary collapse
-
#partial ⇒ Object
Returns the value of attribute partial.
Instance Method Summary collapse
- #capture_with_outer_partial_access(*args, &block) ⇒ Object
- #render(options = {}, locals = {}, &block) ⇒ Object
Instance Attribute Details
#partial ⇒ Object
Returns the value of attribute partial.
6 7 8 |
# File 'lib/slotify/extensions/base.rb', line 6 def partial @partial end |
Instance Method Details
#capture_with_outer_partial_access(*args, &block) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/slotify/extensions/base.rb', line 15 def capture_with_outer_partial_access(*args, &block) inner_partial, @partial = partial, partial.outer_partial inner_partial.capture(*args, &block) ensure @partial = inner_partial end |
#render(options = {}, locals = {}, &block) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/slotify/extensions/base.rb', line 8 def render( = {}, locals = {}, &block) @partial = Slotify::Partial.new(self) super ensure @partial = partial.outer_partial end |