summaryrefslogtreecommitdiff
path: root/ruby_1_9_3/ext/psych/lib/psych/nodes/document.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-14 11:39:21 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-14 11:39:21 +0000
commite76eb06feb024828034379797129d92522e28516 (patch)
tree1326c625c233ba2554043203a7697f5e3d4c49e5 /ruby_1_9_3/ext/psych/lib/psych/nodes/document.rb
parentaa6e98139c8e1ea442fb2182341aaa08ff55b529 (diff)
parentbede15ac5e701ed08f3fc64c2dba03d3f393c652 (diff)
add tag v1_9_3_426v1_9_3_426
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_3_426@40737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby_1_9_3/ext/psych/lib/psych/nodes/document.rb')
-rw-r--r--ruby_1_9_3/ext/psych/lib/psych/nodes/document.rb60
1 files changed, 0 insertions, 60 deletions
diff --git a/ruby_1_9_3/ext/psych/lib/psych/nodes/document.rb b/ruby_1_9_3/ext/psych/lib/psych/nodes/document.rb
deleted file mode 100644
index 32014d60dc..0000000000
--- a/ruby_1_9_3/ext/psych/lib/psych/nodes/document.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-module Psych
- module Nodes
- ###
- # This represents a YAML Document. This node must be a child of
- # Psych::Nodes::Stream. A Psych::Nodes::Document must have one child,
- # and that child may be one of the following:
- #
- # * Psych::Nodes::Sequence
- # * Psych::Nodes::Mapping
- # * Psych::Nodes::Scalar
- class Document < Psych::Nodes::Node
- # The version of the YAML document
- attr_accessor :version
-
- # A list of tag directives for this document
- attr_accessor :tag_directives
-
- # Was this document implicitly created?
- attr_accessor :implicit
-
- # Is the end of the document implicit?
- attr_accessor :implicit_end
-
- ###
- # Create a new Psych::Nodes::Document object.
- #
- # +version+ is a list indicating the YAML version.
- # +tags_directives+ is a list of tag directive declarations
- # +implicit+ is a flag indicating whether the document will be implicitly
- # started.
- #
- # == Example:
- # This creates a YAML document object that represents a YAML 1.1 document
- # with one tag directive, and has an implicit start:
- #
- # Psych::Nodes::Document.new(
- # [1,1],
- # [["!", "tag:tenderlovemaking.com,2009:"]],
- # true
- # )
- #
- # == See Also
- # See also Psych::Handler#start_document
- def initialize version = [], tag_directives = [], implicit = false
- super()
- @version = version
- @tag_directives = tag_directives
- @implicit = implicit
- @implicit_end = true
- end
-
- ###
- # Returns the root node. A Document may only have one root node:
- # http://yaml.org/spec/1.1/#id898031
- def root
- children.first
- end
- end
- end
-end