Closed ota42y closed 5 years ago
When we execute this code with -w option, we got warning. Parameter object not set @name so we should initialize @name.
require 'oas_parser' d = OasParser::Definition.resolve("./spec/fixtures/petstore-expanded.yml") path = d.path_by_path('/pets') endpoint = path.endpoint_by_method('get') endpoint.query_parameters.map{ |param| param.name }
ruby -w test.rb /.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/oas_parser-0.14.0/lib/oas_parser/abstract_attribute.rb:6: warning: instance variable @name not initialized /.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/oas_parser-0.14.0/lib/oas_parser/abstract_attribute.rb:6: warning: instance variable @name not initialized
When we execute this code with -w option, we got warning. Parameter object not set @name so we should initialize @name.