Class: WSDL::ParseOptions

Inherits:
Data
  • Object
show all
Defined in:
lib/wsdl/parse_options.rb

Overview

Immutable value object capturing the parse-affecting configuration options that flow through the parse pipeline (Client → CachedResult → Result → Importer).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#limitsObject (readonly)

Returns the value of attribute limits



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/wsdl/parse_options.rb', line 15

ParseOptions = Data.define(:sandbox_paths, :limits, :strict_schema) {
  # Constructs a {ParseOptions} with sensible defaults.
  #
  # @param sandbox_paths [Array<String>, nil] sandbox paths (default: `nil`, auto-resolved by Source)
  # @param limits [Limits, nil] resource limits (default: {WSDL.limits})
  # @param strict_schema [Boolean] strict schema mode (default: `true`)
  # @return [ParseOptions]
  #
  def self.default(sandbox_paths: nil, limits: nil, strict_schema: true)
    new(
      sandbox_paths: sandbox_paths,
      limits: limits || WSDL.limits,
      strict_schema: strict_schema ? true : false
    )
  end
}

#sandbox_pathsObject (readonly)

Returns the value of attribute sandbox_paths



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/wsdl/parse_options.rb', line 15

ParseOptions = Data.define(:sandbox_paths, :limits, :strict_schema) {
  # Constructs a {ParseOptions} with sensible defaults.
  #
  # @param sandbox_paths [Array<String>, nil] sandbox paths (default: `nil`, auto-resolved by Source)
  # @param limits [Limits, nil] resource limits (default: {WSDL.limits})
  # @param strict_schema [Boolean] strict schema mode (default: `true`)
  # @return [ParseOptions]
  #
  def self.default(sandbox_paths: nil, limits: nil, strict_schema: true)
    new(
      sandbox_paths: sandbox_paths,
      limits: limits || WSDL.limits,
      strict_schema: strict_schema ? true : false
    )
  end
}

#strict_schemaObject (readonly)

Returns the value of attribute strict_schema



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/wsdl/parse_options.rb', line 15

ParseOptions = Data.define(:sandbox_paths, :limits, :strict_schema) {
  # Constructs a {ParseOptions} with sensible defaults.
  #
  # @param sandbox_paths [Array<String>, nil] sandbox paths (default: `nil`, auto-resolved by Source)
  # @param limits [Limits, nil] resource limits (default: {WSDL.limits})
  # @param strict_schema [Boolean] strict schema mode (default: `true`)
  # @return [ParseOptions]
  #
  def self.default(sandbox_paths: nil, limits: nil, strict_schema: true)
    new(
      sandbox_paths: sandbox_paths,
      limits: limits || WSDL.limits,
      strict_schema: strict_schema ? true : false
    )
  end
}

Class Method Details

.default(sandbox_paths: nil, limits: nil, strict_schema: true) ⇒ ParseOptions

Constructs a WSDL::ParseOptions with sensible defaults.



23
24
25
26
27
28
29
# File 'lib/wsdl/parse_options.rb', line 23

def self.default(sandbox_paths: nil, limits: nil, strict_schema: true)
  new(
    sandbox_paths: sandbox_paths,
    limits: limits || WSDL.limits,
    strict_schema: strict_schema ? true : false
  )
end