Class: Serega::Plugins::Metadata::MetaAttribute::CheckPath

Inherits:
Object
  • Object
show all
Defined in:
lib/serega/plugins/metadata/validations/check_path.rb

Class Method Summary collapse

Class Method Details

.call(path) ⇒ void

This method returns an undefined value.

Checks allowed characters in specified metadata path parts. Globally allowed characters: “a-z”, “A-Z”, “0-9”. Minus and low line “-”, “_” also allowed except as the first or last character.

Parameters:

  • path (Array<String, Symbol>)

    Metadata attribute path names

Raises:

  • (Error)

    when metadata attribute name has invalid format



24
25
26
# File 'lib/serega/plugins/metadata/validations/check_path.rb', line 24

def call(path)
  path.each { |attr_name| check_name(attr_name) }
end