Sha256: 0d2a86e1db51e03ad1cb4cb31453e3d2f11a36df55074be548e2760e84437ceb

Contents?: true

Size: 780 Bytes

Versions: 17

Compression:

Stored size: 780 Bytes

Contents

# frozen_string_literal: false
module Psych
  module JSON
    module YAMLEvents # :nodoc:
      def start_document version, tag_directives, implicit
        super(version, tag_directives, !streaming?)
      end

      def end_document implicit_end = !streaming?
        super(implicit_end)
      end

      def start_mapping anchor, tag, implicit, style
        super(anchor, nil, true, Nodes::Mapping::FLOW)
      end

      def start_sequence anchor, tag, implicit, style
        super(anchor, nil, true, Nodes::Sequence::FLOW)
      end

      def scalar value, anchor, tag, plain, quoted, style
        if "tag:yaml.org,2002:null" == tag
          super('null', nil, nil, true, false, Nodes::Scalar::PLAIN)
        else
          super
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
psych-3.0.0.beta2-java lib/psych/json/yaml_events.rb
psych-3.0.0.beta2 lib/psych/json/yaml_events.rb
psych-2.2.4-java lib/psych/json/yaml_events.rb
psych-2.2.4 lib/psych/json/yaml_events.rb
psych-2.2.3-java lib/psych/json/yaml_events.rb
psych-2.2.3 lib/psych/json/yaml_events.rb
ruby-compiler-0.1.1 vendor/ruby/ext/psych/lib/psych/json/yaml_events.rb
psych-2.2.2-java lib/psych/json/yaml_events.rb
psych-2.2.2 lib/psych/json/yaml_events.rb
psych-2.2.1-java lib/psych/json/yaml_events.rb
psych-2.2.1 lib/psych/json/yaml_events.rb
psych-2.2.0-java lib/psych/json/yaml_events.rb
psych-2.2.0 lib/psych/json/yaml_events.rb
psych-2.1.1-java lib/psych/json/yaml_events.rb
psych-2.1.1 lib/psych/json/yaml_events.rb
psych-2.1.0-java lib/psych/json/yaml_events.rb
psych-2.1.0 lib/psych/json/yaml_events.rb