Class: ActionView::PartialIteration
Relationships & Source Files | |
Inherits: | Object |
Defined in: | actionview/lib/action_view/renderer/partial_renderer.rb |
Class Method Summary
- .new(size) ⇒ PartialIteration constructor
Instance Attribute Summary
-
#first? ⇒ Boolean
readonly
Check if this is the first iteration of the partial.
-
#index
readonly
The current iteration of the partial.
-
#last? ⇒ Boolean
readonly
Check if this is the last iteration of the partial.
-
#size
readonly
The number of iterations that will be done by the partial.
Constructor Details
.new(size) ⇒ PartialIteration
Instance Attribute Details
#first? ⇒ Boolean
(readonly)
Check if this is the first iteration of the partial.
# File 'actionview/lib/action_view/renderer/partial_renderer.rb', line 17
def first? index == 0 end
#index (readonly)
The current iteration of the partial.
# File 'actionview/lib/action_view/renderer/partial_renderer.rb', line 9
attr_reader :index
#last? ⇒ Boolean
(readonly)
Check if this is the last iteration of the partial.
#size (readonly)
The number of iterations that will be done by the partial.
# File 'actionview/lib/action_view/renderer/partial_renderer.rb', line 6
attr_reader :size