Skip to content

Commit 9515424

Browse files
committed
Added comment to explain ValidateContext.
1 parent 53398d3 commit 9515424

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/html/pipeline/validate_context.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
module HTML
44
class Pipeline
5+
# Singleton for tracking required context.
6+
# Required context can be pushed onto the internal @required_context Hash.
7+
# For example:
8+
#
9+
# ValidateContext.instance['HTML::Pipeline::CamoFilter'] = [:asset_host]
10+
#
11+
# The key needs to be the name of the class that requires the context
12+
# specified as an array of symbols
513
class ValidateContext
614
include Singleton
715

@@ -20,7 +28,6 @@ def [](key)
2028
def []=(key, value)
2129
@required_context[key] = value
2230
end
23-
2431
end
2532
end
2633
end

0 commit comments

Comments
 (0)