Skip to content
Browse files

sequence documentation

  • Loading branch information...
1 parent ed1d041 commit 9a6eb3f0737f67163475288d491daa738876b751 @tenderlove committed Jan 3, 2010
Showing with 32 additions and 1 deletion.
  1. +32 −1 lib/psych/handler.rb
View
33 lib/psych/handler.rb
@@ -92,7 +92,7 @@ def alias anchor
# +quoted+ is a boolean value
# +style+ is an integer idicating the string style
#
- # See this constants in Psych::Nodes::Scalar for the possible values of
+ # See the constants in Psych::Nodes::Scalar for the possible values of
# +style+
#
# === Example
@@ -123,6 +123,37 @@ def scalar value, anchor, tag, plain, quoted, style
###
# Called when a sequence is started.
+ #
+ # +anchor+ is the anchor associated with the sequence or nil.
+ # +tag+ is the tag associated with the sequence or nil.
+ # +implicit+ a boolean indicating whether or not the sequence was implcitly
+ # started.
+ # +style+ is an integer indicating the list style.
+ #
+ # See the constants in Psych::Nodes::Sequence for the possible values of
+ # +style+.
+ #
+ # === Example
+ #
+ # Here is a YAML document that exercises most of the possible ways this
+ # method can be called:
+ #
+ # ---
+ # - !!seq [
+ # a
+ # ]
+ # - &pewpew
+ # - b
+ #
+ # The above YAML document consists of three lists, an outer list that
+ # contains two inner lists. Here is a matrix of the parameters sent
+ # to represent these lists:
+ #
+ # # anchor tag implicit style
+ # [nil, nil, true, 1 ]
+ # [nil, "tag:yaml.org,2002:seq", false, 2 ]
+ # ["pewpew", nil, true, 1 ]
+
def start_sequence anchor, tag, implicit, style
end

0 comments on commit 9a6eb3f

Please sign in to comment.
Something went wrong with that request. Please try again.