Method: Beaker::Options::Validator#validate_frictionless_roles

Defined in:
lib/beaker/options/validator.rb

#validate_frictionless_roles(role_array) ⇒ Object

Raises an error if role_array contains the frictionless role and conflicting roles.

Parameters:

  • role_array (Array<String>)

    List of roles

Raises:

  • (ArgumentError)

    Raises if role_array contains conflicting roles



102
103
104
105
106
# File 'lib/beaker/options/validator.rb', line 102

def validate_frictionless_roles(role_array)
  return unless role_array.include?(FRICTIONLESS_ROLE) and !(role_array & FRICTIONLESS_ADDITIONAL_ROLES).empty?

  validator_error "Only agent nodes may have the role 'frictionless'."
end