Class: Hash
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#is_complex_yaml? ⇒ Boolean
34 |
# File 'lib/rbyaml/rubytypes.rb', line 34 def is_complex_yaml?; true; end |
#to_yaml_node(repre) ⇒ Object
44 45 46 47 48 |
# File 'lib/rbyaml/rubytypes.rb', line 44 def to_yaml_node(repre) RbYAML::quick_emit_node(object_id, repre) {|rep| rep.map(taguri,self,to_yaml_style) } end |
#yaml_initialize(tag, val) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/rbyaml/rubytypes.rb', line 35 def yaml_initialize( tag, val ) if Array === val update Hash.[]( *val ) # Convert the map to a sequence elsif Hash === val update val else raise RbYAML::TypeError, "Invalid map explicitly tagged #{ tag }: " + val.inspect end end |