diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-02-20 14:34:31 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-02-20 14:34:31 -0800 |
commit | c8b36b32fca3153bfe41a9972f39cde50310ec84 (patch) | |
tree | fbb33517a62c38802230fd43868fac609a68201b /lib | |
parent | c0ea6504cc7b1000c11babadf9e233e1b18291f8 (diff) | |
download | psych-c8b36b32fca3153bfe41a9972f39cde50310ec84.zip |
adding represent_map to the coder
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psych/coder.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/psych/coder.rb b/lib/psych/coder.rb index ae88e4a..c9f9a18 100644 --- a/lib/psych/coder.rb +++ b/lib/psych/coder.rb @@ -25,12 +25,18 @@ module Psych self.scalar = value end - # Emit a sequence with +value+ and +tag+ + # Emit a sequence with +list+ and +tag+ def represent_seq tag, list @tag = tag self.seq = list end + # Emit a sequence with +map+ and +tag+ + def represent_map tag, map + @tag = tag + self.map = map + end + # Emit a scalar with +value+ def scalar= value @type = :scalar |