Module: Dry::Validation::Rust::BlockKeywordParameters Private

Defined in:
lib/dry/validation/rust/block_keyword_parameters.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Constant Summary collapse

EMPTY =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

[].freeze

Class Method Summary collapse

Class Method Details

.extract(block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
15
16
# File 'lib/dry/validation/rust/block_keyword_parameters.rb', line 12

def extract(block)
  block.parameters.filter_map do |kind, name|
    name if %i[key keyreq].include?(kind)
  end.freeze
end