Skip to content

Commit

Permalink
Merge pull request #1588 from Shopify/jake-add-forloop-parentloop
Browse files Browse the repository at this point in the history
document forloop.parentloop
  • Loading branch information
NadaMarawan authored Jun 30, 2022
2 parents 150ddf4 + 6d3c5ef commit 6981305
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/liquid/forloop_drop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@ def initialize(name, length, parentloop)
end

# @liquid_public_docs
# @liquid_name forloop.length
# @liquid_name length
# @liquid_summary
# The total number of iterations in the loop.
# @liquid_return [number]
attr_reader :length

# @liquid_public_docs
# @liquid_name parentloop
# @liquid_summary
# The parent `forloop` object.
# @liquid_description
# If the current `for` loop isn't nested inside another `for` loop, then `nil` is returned.
# @liquid_return [forloop]
attr_reader :parentloop

def name
Expand Down

0 comments on commit 6981305

Please sign in to comment.