Class: LiquidLint::CaptureMap
- Inherits:
-
Hash
- Object
- Hash
- LiquidLint::CaptureMap
- Defined in:
- lib/liquid_lint/capture_map.rb
Overview
Holds the list of captures, providing a convenient interface for accessing the values and unwrapping them on your behalf.
Instance Method Summary collapse
-
#[](capture_name) ⇒ Object
Returns the captured value with the specified name.
Instance Method Details
#[](capture_name) ⇒ Object
Returns the captured value with the specified name.
11 12 13 14 15 16 17 |
# File 'lib/liquid_lint/capture_map.rb', line 11 def [](capture_name) if key?(capture_name) super.value else raise ArgumentError, "Capture #{capture_name.inspect} does not exist!" end end |