Sha256: 54ee273c354961e75d0cae877df9d039e6061055caa2f0cf42ecf633e054ab0e

Contents?: true

Size: 751 Bytes

Versions: 103

Compression:

Stored size: 751 Bytes

Contents

class Object
  def self.yaml_tag url
    Psych.add_tag(url, self)
  end

  # FIXME: rename this to "to_yaml" when syck is removed

  ###
  # call-seq: to_yaml(options = {})
  #
  # Convert an object to YAML.  See Psych.dump for more information on the
  # available +options+.
  def psych_to_yaml options = {}
    Psych.dump self, options
  end
  remove_method :to_yaml rescue nil
  alias :to_yaml :psych_to_yaml
end

class Module
  def psych_yaml_as url
    return if caller[0].end_with?('rubytypes.rb')
    if $VERBOSE
      warn "#{caller[0]}: yaml_as is deprecated, please use yaml_tag"
    end
    Psych.add_tag(url, self)
  end

  remove_method :yaml_as rescue nil
  alias :yaml_as :psych_yaml_as
end

if defined?(::IRB)
  require 'psych/y'
end

Version data entries

103 entries across 75 versions & 6 rubygems

Version Path
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/psych/core_ext.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/psych/core_ext.rb