Class: Array

Inherits:
Object show all
Defined in:
lib/syck/rubytypes.rb

Direct Known Subclasses

Syck::Mapping, Syck::Omap, Syck::Pairs, Syck::Sequence

Instance Method Summary collapse

Instance Method Details

#to_yaml(opts = {}) ⇒ Object



110
111
112
113
114
115
116
117
118
119
# File 'lib/syck/rubytypes.rb', line 110

def to_yaml( opts = {} )
       return super unless YAML::ENGINE.syck?
	YAML::quick_emit( self, opts ) do |out|
           out.seq( taguri, to_yaml_style ) do |seq|
               each do |x|
                   seq.add( x )
               end
           end
       end
end

#yaml_initialize(tag, val) ⇒ Object



109
# File 'lib/syck/rubytypes.rb', line 109

def yaml_initialize( tag, val ); concat( val.to_a ); end