summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-27 19:04:36 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-27 19:04:36 -0700
commitf03e9238355090be1b2a6bea189ac7f3ce8a5a67 (patch)
tree099d46fcbdd53c8fd121d68579b69d55c5404740
parent6efdbaeb05e9f9200d7c95baaf44ffffa4e8dc6a (diff)
downloadpsych-f03e9238355090be1b2a6bea189ac7f3ce8a5a67.zip
adding sequence documentation
-rw-r--r--lib/psych/nodes/sequence.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/psych/nodes/sequence.rb b/lib/psych/nodes/sequence.rb
index 9b87f61..ff5a642 100644
--- a/lib/psych/nodes/sequence.rb
+++ b/lib/psych/nodes/sequence.rb
@@ -1,5 +1,34 @@
module Psych
module Nodes
+ ###
+ # This class represents a
+ # {YAML sequence}[http://yaml.org/spec/1.1/#sequence/syntax].
+ #
+ # A YAML sequence is basically a list, and looks like this:
+ #
+ # %YAML 1.1
+ # ---
+ # - I am
+ # - a Sequence
+ #
+ # A YAML sequence may have an anchor like this:
+ #
+ # %YAML 1.1
+ # ---
+ # &A [
+ # "This sequence",
+ # "has an anchor"
+ # ]
+ #
+ # A YAML sequence may also have a tag like this:
+ #
+ # %YAML 1.1
+ # ---
+ # !!seq [
+ # "This sequence",
+ # "has an anchor"
+ # ]
+ #
class Sequence < Psych::Nodes::Node
# The anchor for this sequence (if any)
attr_accessor :anchor