Class: Serega::SeregaPlugins::Metadata::MetaAttribute::CheckPath

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

Overview

Validator for meta_attribute :path parameter

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:

  • (SeregaError)

    when metadata attribute name has invalid format



27
28
29
# File 'lib/serega/plugins/metadata/validations/check_path.rb', line 27

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