Class: JSONRPC::Configuration::Procedure

Inherits:
Data
  • Object
show all
Defined in:
lib/jsonrpc/configuration.rb

Overview

Represents a registered JSON-RPC procedure with its validation contract and configuration

Instance Attribute Summary collapse

Instance Attribute Details

#allow_positional_arguments ⇒ Boolean (readonly)

Indicates if the procedure accepts positional arguments

Examples:

procedure.allow_positional_arguments # => true

Returns:

  • (Boolean) —

    whether the procedure accepts positional arguments



53
# File 'lib/jsonrpc/configuration.rb', line 53

Procedure = Data.define(:allow_positional_arguments, :contract, :parameter_name)

#contract ⇒ Dry::Validation::Contract (readonly)

The validation contract for procedure parameters

Examples:

procedure.contract # => #<Dry::Validation::Contract...>

Returns:

  • (Dry::Validation::Contract) —

    the validation contract for procedure parameters



53
# File 'lib/jsonrpc/configuration.rb', line 53

Procedure = Data.define(:allow_positional_arguments, :contract, :parameter_name)

#parameter_name ⇒ Symbol? (readonly)

The name of the first parameter in the contract schema

Examples:

procedure.parameter_name # => :numbers

Returns:

  • (Symbol, nil) —

    the name of the first parameter in the contract schema



53
# File 'lib/jsonrpc/configuration.rb', line 53

Procedure = Data.define(:allow_positional_arguments, :contract, :parameter_name)