method
push
v2_6_3 -
Show latest stable
- Class:
Psych::Visitors::YAMLTree
push(object)public
No documentation available.
# File ext/psych/lib/psych/visitors/yaml_tree.rb, line 103
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 [email protected]?
end