Class: GrapeOAS::Introspectors::DryIntrospectorSupport::ConstraintExtractor::ConstraintSet

Inherits:
Object
  • Object
show all
Defined in:
lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb

Overview

Value object holding all possible constraints extracted from a Dry contract.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**attrs) ⇒ ConstraintSet

Returns a new instance of ConstraintSet.



16
17
18
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 16

def initialize(**attrs)
  attrs.each { |k, v| public_send(:"#{k}=", v) }
end

Instance Attribute Details

#enumObject

Returns the value of attribute enum.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def enum
  @enum
end

#excluded_valuesObject

Returns the value of attribute excluded_values.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def excluded_values
  @excluded_values
end

#exclusive_maximumObject

Returns the value of attribute exclusive_maximum.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def exclusive_maximum
  @exclusive_maximum
end

#exclusive_minimumObject

Returns the value of attribute exclusive_minimum.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def exclusive_minimum
  @exclusive_minimum
end

#extensionsObject

Returns the value of attribute extensions.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def extensions
  @extensions
end

#formatObject

Returns the value of attribute format.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def format
  @format
end

#max_sizeObject

Returns the value of attribute max_size.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def max_size
  @max_size
end

#maximumObject

Returns the value of attribute maximum.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def maximum
  @maximum
end

#min_sizeObject

Returns the value of attribute min_size.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def min_size
  @min_size
end

#minimumObject

Returns the value of attribute minimum.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def minimum
  @minimum
end

#nullableObject

Returns the value of attribute nullable.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def nullable
  @nullable
end

#parityObject

Returns the value of attribute parity.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def parity
  @parity
end

#patternObject

Returns the value of attribute pattern.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def pattern
  @pattern
end

#requiredObject

Returns the value of attribute required.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def required
  @required
end

#type_predicateObject

Returns the value of attribute type_predicate.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def type_predicate
  @type_predicate
end

#unhandled_predicatesObject

Returns the value of attribute unhandled_predicates.



11
12
13
# File 'lib/grape_oas/introspectors/dry_introspector_support/constraint_extractor.rb', line 11

def unhandled_predicates
  @unhandled_predicates
end