summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/psych.rb8
-rw-r--r--lib/psych/parser/handler.rb5
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/psych.rb b/lib/psych.rb
index df00156..a695b0a 100644
--- a/lib/psych.rb
+++ b/lib/psych.rb
@@ -11,6 +11,14 @@ module Psych
UTF16LE_ENCODING = 3
UTF16BE_ENCODING = 4
+ # Scalar Styles
+ ANY_SCALAR_STYLE = 0
+ PLAIN_SCALAR_STYLE = 1
+ SINGLE_QUOTED_SCALAR_STYLE = 2
+ DOUBLE_QUOTED_SCALAR_STYLE = 3
+ LITERAL_SCALAR_STYLE = 4
+ FOLDED_SCALAR_STYLE = 5
+
def self.parse thing
Psych::Parser.new.parse thing
end
diff --git a/lib/psych/parser/handler.rb b/lib/psych/parser/handler.rb
index a0152e7..9cb8281 100644
--- a/lib/psych/parser/handler.rb
+++ b/lib/psych/parser/handler.rb
@@ -25,8 +25,9 @@ module Psych
end
###
- # Called when a scalar +value+ is found
- def scalar value, anchor = nil, tag = nil
+ # Called when a scalar +value+ is found. The scalar may have an
+ # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+
+ def scalar value, anchor = nil, tag = nil, plain = true, quoted = true, style = 0
end
###