Class: Openapi3Parser::Validators::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi3_parser/validators/reference.rb

Instance Method Summary collapse

Constructor Details

#initialize(given_reference) ⇒ Reference

Returns a new instance of Reference.



6
7
8
# File 'lib/openapi3_parser/validators/reference.rb', line 6

def initialize(given_reference)
  @given_reference = given_reference
end

Instance Method Details

#errorsObject



14
15
16
# File 'lib/openapi3_parser/validators/reference.rb', line 14

def errors
  @errors ||= Array(build_errors)
end

#valid?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/openapi3_parser/validators/reference.rb', line 10

def valid?
  errors.empty?
end