PHP 8.2.31
Preview: streaming.rb Size: 667 B
//proc/thread-self/root/opt/alt/ruby33/share/gems/gems/psych-5.1.2/lib/psych/streaming.rb

# frozen_string_literal: true
module Psych
  module Streaming
    module ClassMethods
      ###
      # Create a new streaming emitter.  Emitter will print to +io+.  See
      # Psych::Stream for an example.
      def new io
        emitter      = const_get(:Emitter).new(io)
        class_loader = ClassLoader.new
        ss           = ScalarScanner.new class_loader
        super(emitter, ss, {})
      end
    end

    ###
    # Start streaming using +encoding+
    def start encoding = Nodes::Stream::UTF8
      super.tap { yield self if block_given?  }
    ensure
      finish if block_given?
    end

    private
    def register target, obj
    end
  end
end

Directory Contents

Dirs: 4 × Files: 17

Name Size Perms Modified Actions
handlers DIR
- drwxr-xr-x 2026-04-30 07:09:18
Edit Download
json DIR
- drwxr-xr-x 2026-04-30 07:09:18
Edit Download
nodes DIR
- drwxr-xr-x 2026-04-30 07:09:18
Edit Download
visitors DIR
- drwxr-xr-x 2026-04-30 07:09:18
Edit Download
2.01 KB lrw-r--r-- 2026-04-07 13:52:15
Edit Download
2.05 KB lrw-r--r-- 2026-04-07 13:52:15
Edit Download
362 B lrw-r--r-- 2026-04-07 13:52:15
Edit Download
726 B lrw-r--r-- 2026-04-07 13:52:15
Edit Download
7.20 KB lrw-r--r-- 2026-04-07 13:52:15
Edit Download
2.38 KB lrw-r--r-- 2026-04-07 13:52:15
Edit Download
75 B lrw-r--r-- 2026-04-07 13:52:15
Edit Download
2.03 KB lrw-r--r-- 2026-04-07 13:52:15
Edit Download
4.69 KB lrw-r--r-- 2026-04-07 13:52:15
Edit Download
74 B lrw-r--r-- 2026-04-07 13:52:15
Edit Download
923 B lrw-r--r-- 2026-04-07 13:52:15
Edit Download
667 B lrw-r--r-- 2026-04-07 13:52:15
Edit Download
588 B lrw-r--r-- 2026-04-07 13:52:15
Edit Download
3.02 KB lrw-r--r-- 2026-04-07 13:52:15
Edit Download
187 B lrw-r--r-- 2026-04-07 13:52:15
Edit Download
254 B lrw-r--r-- 2026-04-07 13:52:15
Edit Download
190 B lrw-r--r-- 2026-04-07 13:52:15
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).