lib/rio/ext/yaml.rb in rio-0.5.1 vs lib/rio/ext/yaml.rb in rio-0.6.0

- old
+ new

@@ -1,8 +1,8 @@ #-- # =========================================================================== -# Copyright (c) 2005-2012 Christopher Kleckner +# Copyright (c) 2005-2017 Christopher Kleckner # All rights reserved # # This file is part of the Rio library for ruby. # # Rio is free software; you can redistribute it and/or modify @@ -20,22 +20,20 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # =========================================================================== #++ # - require 'yaml' module RIO module Ext module YAML #:nodoc: all module Cx def yaml(&block) cxx('yaml',true,&block) end def yamldoc(&block) - #@yamldoc = YAML::Tie::Doc.new(self.fspath).open become('Ext::YAML::Doc::Existing') end def yaml?() cxx?('yaml') end def yaml_(fs=',',rs=nil) cxx_('yaml',true) @@ -109,28 +107,15 @@ module YAML module Output protected def cpfrom_(arg) - #p "yaml#cpfrom_(#{arg})" case arg - #when ::Array then cpfrom_array_(arg) when Rio,::IO,::StringIO then super else self.put_(arg) end self end -# def cpfrom_array_(array) -# array.each { |el| -# self.put_(el) -# } -# self -# end -# def cpfrom_rio_(ario) -# p "yaml#cpfrom_rio_(#{ario})" -# ioh.puts(::YAML.dump_stream(*ario[])) -# self -# end def put_(obj) #p callstr('put_',obj) ioh.puts(obj.to_yaml) end