class Psych::Nodes::Sequence

  • Psych::Nodes::Alias
    * Psych::Nodes::Scalar
    * Psych::Nodes::Mapping
    * Psych::Nodes::Sequence
    for this node are:
    Psych::Nodes::Sequence node may have 0 or more children. Valid children
    This class represents a sequence in a YAML document. A
    ]
    “has a tag”
    “This sequence”,
    !!seq [

    %YAML 1.1
    A YAML sequence may also have a tag like this:
    ]
    “has an anchor”
    “This sequence”,
    &A [

    %YAML 1.1
    A YAML sequence may have an anchor like this:
    - a Sequence
    - I am

    %YAML 1.1
    A YAML sequence is basically a list, and looks like this:
    .
    This class represents a
    ##

def initialize anchor = nil, tag = nil, implicit = true, style = BLOCK

See Psych::Handler#start_sequence

+style+ is an integer indicating the list style.
implicitly started.
+implicit+ a boolean indicating whether or not the sequence was
+tag+ is the tag associated with the sequence or nil.
+anchor+ is the anchor associated with the sequence or nil.

Create a new object representing a YAML sequence.
##
def initialize anchor = nil, tag = nil, implicit = true, style = BLOCK
  super()
  @anchor   = anchor
  @tag      = tag
  @implicit = implicit
  @style    = style
end

def sequence?; true; end

def sequence?; true; end