Class: Rage::OpenAPI::Parsers::YAML

Inherits:
Object
  • Object
show all
Defined in:
lib/rage/openapi/parsers/yaml.rb

Instance Method Summary collapse

Constructor Details

#initializeYAML

Returns a new instance of YAML.



8
9
# File 'lib/rage/openapi/parsers/yaml.rb', line 8

def initialize(**)
end

Instance Method Details

#known_definition?(yaml) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
# File 'lib/rage/openapi/parsers/yaml.rb', line 11

def known_definition?(yaml)
  object = process_yaml(yaml) rescue nil
  !!object && object.is_a?(Enumerable)
end

#parse(yaml) ⇒ Object



16
17
18
# File 'lib/rage/openapi/parsers/yaml.rb', line 16

def parse(yaml)
  __parse(process_yaml(yaml))
end