Class: Openapi3Parser::Validation::ErrorCollection::LocationTypeGroup

Inherits:
Struct
  • Object
show all
Defined in:
lib/openapi3_parser/validation/error_collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorsObject

Returns the value of attribute errors

Returns:

  • (Object)

    the current value of errors



69
70
71
# File 'lib/openapi3_parser/validation/error_collection.rb', line 69

def errors
  @errors
end

#for_typeObject

Returns the value of attribute for_type

Returns:

  • (Object)

    the current value of for_type



69
70
71
# File 'lib/openapi3_parser/validation/error_collection.rb', line 69

def for_type
  @for_type
end

#source_locationObject

Returns the value of attribute source_location

Returns:

  • (Object)

    the current value of source_location



69
70
71
# File 'lib/openapi3_parser/validation/error_collection.rb', line 69

def source_location
  @source_location
end

Instance Method Details

#location_summary(with_type: false) ⇒ Object



70
71
72
73
74
# File 'lib/openapi3_parser/validation/error_collection.rb', line 70

def location_summary(with_type: false)
  string = source_location.to_s
  string << " (as #{for_type})" if with_type && !for_type&.empty?
  string
end