summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/lib/psych/nodes')
-rw-r--r--ext/psych/lib/psych/nodes/alias.rb2
-rw-r--r--ext/psych/lib/psych/nodes/document.rb2
-rw-r--r--ext/psych/lib/psych/nodes/mapping.rb2
-rw-r--r--ext/psych/lib/psych/nodes/node.rb7
-rw-r--r--ext/psych/lib/psych/nodes/scalar.rb2
-rw-r--r--ext/psych/lib/psych/nodes/sequence.rb2
-rw-r--r--ext/psych/lib/psych/nodes/stream.rb2
7 files changed, 19 insertions, 0 deletions
diff --git a/ext/psych/lib/psych/nodes/alias.rb b/ext/psych/lib/psych/nodes/alias.rb
index 8131a4befb..6da655f0fd 100644
--- a/ext/psych/lib/psych/nodes/alias.rb
+++ b/ext/psych/lib/psych/nodes/alias.rb
@@ -14,6 +14,8 @@ module Psych
def initialize anchor
@anchor = anchor
end
+
+ def alias?; true; end
end
end
end
diff --git a/ext/psych/lib/psych/nodes/document.rb b/ext/psych/lib/psych/nodes/document.rb
index 3cd418eaf3..f57410d636 100644
--- a/ext/psych/lib/psych/nodes/document.rb
+++ b/ext/psych/lib/psych/nodes/document.rb
@@ -56,6 +56,8 @@ module Psych
def root
children.first
end
+
+ def document?; true; end
end
end
end
diff --git a/ext/psych/lib/psych/nodes/mapping.rb b/ext/psych/lib/psych/nodes/mapping.rb
index b921ddc862..d49678cb0e 100644
--- a/ext/psych/lib/psych/nodes/mapping.rb
+++ b/ext/psych/lib/psych/nodes/mapping.rb
@@ -52,6 +52,8 @@ module Psych
@implicit = implicit
@style = style
end
+
+ def mapping?; true; end
end
end
end
diff --git a/ext/psych/lib/psych/nodes/node.rb b/ext/psych/lib/psych/nodes/node.rb
index 6d86669a17..f59fb8916b 100644
--- a/ext/psych/lib/psych/nodes/node.rb
+++ b/ext/psych/lib/psych/nodes/node.rb
@@ -63,6 +63,13 @@ module Psych
io
end
alias :to_yaml :yaml
+
+ def alias?; false; end
+ def document?; false; end
+ def mapping?; false; end
+ def scalar?; false; end
+ def sequence?; false; end
+ def stream?; false; end
end
end
end
diff --git a/ext/psych/lib/psych/nodes/scalar.rb b/ext/psych/lib/psych/nodes/scalar.rb
index b448858831..e2616b6a84 100644
--- a/ext/psych/lib/psych/nodes/scalar.rb
+++ b/ext/psych/lib/psych/nodes/scalar.rb
@@ -63,6 +63,8 @@ module Psych
@quoted = quoted
@style = style
end
+
+ def scalar?; true; end
end
end
end
diff --git a/ext/psych/lib/psych/nodes/sequence.rb b/ext/psych/lib/psych/nodes/sequence.rb
index 77c2c602b9..740f1938a4 100644
--- a/ext/psych/lib/psych/nodes/sequence.rb
+++ b/ext/psych/lib/psych/nodes/sequence.rb
@@ -77,6 +77,8 @@ module Psych
@implicit = implicit
@style = style
end
+
+ def sequence?; true; end
end
end
end
diff --git a/ext/psych/lib/psych/nodes/stream.rb b/ext/psych/lib/psych/nodes/stream.rb
index 2474fe62c4..b525217821 100644
--- a/ext/psych/lib/psych/nodes/stream.rb
+++ b/ext/psych/lib/psych/nodes/stream.rb
@@ -33,6 +33,8 @@ module Psych
super()
@encoding = encoding
end
+
+ def stream?; true; end
end
end
end