diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-10-08 21:12:48 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-10-08 21:12:48 -0700 |
commit | 4d6d48b119cf62fb01f54730e9efcf76b8ab351a (patch) | |
tree | 89427eba988dac667cfe0a81bc89809f7ba0712c /lib/psych.rb | |
parent | 6f5fcb7d4e7388f2ba78f3b0b6b35563fd11135a (diff) | |
download | psych-4d6d48b119cf62fb01f54730e9efcf76b8ab351a.zip |
supporting add_domain_ype syntax
Diffstat (limited to 'lib/psych.rb')
-rw-r--r-- | lib/psych.rb | 6 |
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 |