module Rack::Test::Body::YAML

Public Instance Methods

parse_text(content_type, content, symbolize_keys: false) click to toggle source
Calls superclass method
# File lib/rack/test/body/yaml.rb, line 31
def parse_text(content_type, content, symbolize_keys: false)
        if yaml?(content_type)
                ::YAML.load(content)
        else
                super
        end
end
yaml?(content_type = self.content_type) click to toggle source
# File lib/rack/test/body/yaml.rb, line 27
def yaml?(content_type = self.content_type)
        content_type.start_with? "application/yaml"
end