PHP 8.2.31
Preview: streaming.rb Size: 667 B
/proc/thread-self/root/opt/alt/ruby27/share/gems/gems/psych-3.1.0/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 2024-03-03 22:47:25
Edit Download
json DIR
- drwxr-xr-x 2024-03-03 22:47:25
Edit Download
nodes DIR
- drwxr-xr-x 2024-03-03 22:47:25
Edit Download
visitors DIR
- drwxr-xr-x 2024-03-03 22:47:25
Edit Download
1.91 KB lrw-r--r-- 2023-06-06 14:54:34
Edit Download
2.05 KB lrw-r--r-- 2023-06-06 14:54:34
Edit Download
359 B lrw-r--r-- 2023-06-06 14:54:34
Edit Download
264 B lrw-r--r-- 2023-06-06 14:54:34
Edit Download
7.20 KB lrw-r--r-- 2023-06-06 14:54:34
Edit Download
2.35 KB lrw-r--r-- 2023-06-06 14:54:34
Edit Download
75 B lrw-r--r-- 2023-06-06 14:54:34
Edit Download
1.67 KB lrw-r--r-- 2023-06-06 14:54:34
Edit Download
4.14 KB lrw-r--r-- 2023-06-06 14:54:34
Edit Download
74 B lrw-r--r-- 2023-06-06 14:54:34
Edit Download
923 B lrw-r--r-- 2023-06-06 14:54:34
Edit Download
667 B lrw-r--r-- 2023-06-06 14:54:34
Edit Download
585 B lrw-r--r-- 2023-06-06 14:54:34
Edit Download
2.98 KB lrw-r--r-- 2023-06-06 14:54:34
Edit Download
222 B lrw-r--r-- 2023-06-06 14:54:34
Edit Download
236 B lrw-r--r-- 2023-06-06 14:54:34
Edit Download
190 B lrw-r--r-- 2023-06-06 14:54:34
Edit Download

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