Flowdock
method

push

Importance_0
v2_1_10 - Show latest stable - 0 notes - Class: YAMLTree
push(object) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File ext/psych/lib/psych/visitors/yaml_tree.rb, line 97
      def push object
        start unless started?
        version = []
        version = [1,1] if @options[:header]

        case @options[:version]
        when Array
          version = @options[:version]
        when String
          version = @options[:version].split('.').map { |x| x.to_i }
        else
          version = [1,1]
        end if @options.key? :version

        @emitter.start_document version, [], false
        accept object
        @emitter.end_document !@emitter.streaming?
      end
Register or log in to add new notes.