diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-03 21:50:47 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-03 21:50:47 +0000 |
commit | eb71e5cd67f4ce4da5ba331f93a8e36c65457b94 (patch) | |
tree | 1df66113ae7340e2b928839b3f09dbf8dcfb3d73 /lib/yaml/stream.rb | |
parent | ca926ad017a804817b9a2e5389196f9acf9d9b68 (diff) |
* lib/yaml: Moved to ext/syck/lib, Syck only uses Syck constant.
* lib/yaml.rb: Added an engine manager for choosing YAML engine.
* ext/syck/lib/syck/rubytypes.rb: squashed warnings when using Psych
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml/stream.rb')
-rw-r--r-- | lib/yaml/stream.rb | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/yaml/stream.rb b/lib/yaml/stream.rb deleted file mode 100644 index 3a5227ec9e..0000000000 --- a/lib/yaml/stream.rb +++ /dev/null @@ -1,41 +0,0 @@ -module YAML - - # - # YAML::Stream -- for emitting many documents - # - class Stream - - attr_accessor :documents, :options - - def initialize( opts = {} ) - @options = opts - @documents = [] - end - - def []( i ) - @documents[ i ] - end - - def add( doc ) - @documents << doc - end - - def edit( doc_num, doc ) - warn "#{caller[0]}: edit is deprecated" if $VERBOSE - @documents[ doc_num ] = doc - end - - def emit( io = nil ) - # opts = @options.dup - # opts[:UseHeader] = true if @documents.length > 1 - out = YAML.emitter - out.reset( io || io2 = StringIO.new ) - @documents.each { |v| - v.to_yaml( out ) - } - io || ( io2.rewind; io2.read ) - end - - end - -end |