Class: MCPClient::SchemaValidator::Evaluation::Application

Inherits:
Struct
  • Object
show all
Defined in:
lib/mcp_client/schema_validator/evaluation.rb

Overview

One (sub)schema being applied to one value: the instance and the context are fixed for a whole trampoline (the same value throughout), the rest is what this application accumulates.

Instance Attribute Summary collapse

Instance Attribute Details

#collecting ⇒ Boolean

Returns whether an unevaluated keyword at this node or at one applying it to the same value reads the annotations, so every branch that passes must be evaluated rather than the first one.

Returns:

  • (Boolean) —

    whether an unevaluated keyword at this node or at one applying it to the same value reads the annotations, so every branch that passes must be evaluated rather than the first one



49
50
# File 'lib/mcp_client/schema_validator/evaluation.rb', line 49

Application = Struct.new(:data, :path, :ctx, :schema, :dialect, :ref_depth, :errors, :counted_before,
:evaluated, :collecting, keyword_init: true)

#counted_before ⇒ Integer

Returns ctx.errors when the application began, so only this node's own errors are charged to MAX_ERRORS.

Returns:

  • (Integer) —

    ctx.errors when the application began, so only this node's own errors are charged to MAX_ERRORS



49
50
# File 'lib/mcp_client/schema_validator/evaluation.rb', line 49

Application = Struct.new(:data, :path, :ctx, :schema, :dialect, :ref_depth, :errors, :counted_before,
:evaluated, :collecting, keyword_init: true)

#ctx ⇒ Object

Returns the value of attribute ctx

Returns:

  • (Object) —

    the current value of ctx



49
50
51
# File 'lib/mcp_client/schema_validator/evaluation.rb', line 49

def ctx
  @ctx
end

#data ⇒ Object

Returns the value of attribute data

Returns:

  • (Object) —

    the current value of data



49
50
51
# File 'lib/mcp_client/schema_validator/evaluation.rb', line 49

def data
  @data
end

#dialect ⇒ Object

Returns the value of attribute dialect

Returns:

  • (Object) —

    the current value of dialect



49
50
51
# File 'lib/mcp_client/schema_validator/evaluation.rb', line 49

def dialect
  @dialect
end

#errors ⇒ Array<String>

Returns this node's own errors so far.

Returns:

  • (Array<String>) —

    this node's own errors so far



49
50
# File 'lib/mcp_client/schema_validator/evaluation.rb', line 49

Application = Struct.new(:data, :path, :ctx, :schema, :dialect, :ref_depth, :errors, :counted_before,
:evaluated, :collecting, keyword_init: true)

#evaluated ⇒ Evaluated?

Returns what was evaluated of an object or array.

Returns:

  • (Evaluated, nil) —

    what was evaluated of an object or array



49
50
# File 'lib/mcp_client/schema_validator/evaluation.rb', line 49

Application = Struct.new(:data, :path, :ctx, :schema, :dialect, :ref_depth, :errors, :counted_before,
:evaluated, :collecting, keyword_init: true)

#path ⇒ Object

Returns the value of attribute path

Returns:

  • (Object) —

    the current value of path



49
50
51
# File 'lib/mcp_client/schema_validator/evaluation.rb', line 49

def path
  @path
end

#ref_depth ⇒ Object

Returns the value of attribute ref_depth

Returns:

  • (Object) —

    the current value of ref_depth



49
50
51
# File 'lib/mcp_client/schema_validator/evaluation.rb', line 49

def ref_depth
  @ref_depth
end

#schema ⇒ Object

Returns the value of attribute schema

Returns:

  • (Object) —

    the current value of schema



49
50
51
# File 'lib/mcp_client/schema_validator/evaluation.rb', line 49

def schema
  @schema
end