summaryrefslogtreecommitdiff
path: root/lib/psych.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-10-08 21:12:48 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-10-08 21:12:48 -0700
commit4d6d48b119cf62fb01f54730e9efcf76b8ab351a (patch)
tree89427eba988dac667cfe0a81bc89809f7ba0712c /lib/psych.rb
parent6f5fcb7d4e7388f2ba78f3b0b6b35563fd11135a (diff)
downloadpsych-4d6d48b119cf62fb01f54730e9efcf76b8ab351a.zip
supporting add_domain_ype syntax
Diffstat (limited to 'lib/psych.rb')
-rw-r--r--lib/psych.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/psych.rb b/lib/psych.rb
index f1ee542..9250a2c 100644
--- a/lib/psych.rb
+++ b/lib/psych.rb
@@ -54,4 +54,10 @@ module Psych
block.call child.to_ruby
end
end
+
+ @domain_types = {}
+ def self.add_domain_type domain, type_tag, &block
+ @domain_types[type_tag] = [domain, block]
+ end
+ class << self; attr_accessor :domain_types; end
end