Class: OpenAPIParser::SchemaValidator::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_parser/schema_validator/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(coerce_value: nil, datetime_coerce_class: nil, validate_header: true) ⇒ Options

Returns a new instance of Options.



11
12
13
14
15
# File 'lib/openapi_parser/schema_validator/options.rb', line 11

def initialize(coerce_value: nil, datetime_coerce_class: nil, validate_header: true)
  @coerce_value = coerce_value
  @datetime_coerce_class = datetime_coerce_class
  @validate_header = validate_header
end

Instance Attribute Details

#coerce_valueBoolean (readonly)

Returns coerce value option on/off.

Returns:

  • (Boolean)

    coerce value option on/off



9
10
11
# File 'lib/openapi_parser/schema_validator/options.rb', line 9

def coerce_value
  @coerce_value
end

#datetime_coerce_classObject? (readonly)

Returns coerce datetime string by this Object class.

Returns:

  • (Object, nil)

    coerce datetime string by this Object class



9
# File 'lib/openapi_parser/schema_validator/options.rb', line 9

attr_reader :coerce_value, :datetime_coerce_class, :validate_header

#validate_headerObject (readonly)

Returns the value of attribute validate_header.



9
# File 'lib/openapi_parser/schema_validator/options.rb', line 9

attr_reader :coerce_value, :datetime_coerce_class, :validate_header