Class: MCollective::Validator::Bolt_task_nameValidator
- Inherits:
-
Object
- Object
- MCollective::Validator::Bolt_task_nameValidator
- Defined in:
- lib/mcollective/validator/bolt_task_name_validator.rb
Class Method Summary collapse
Class Method Details
.validate(name) ⇒ Object
4 5 6 7 8 |
# File 'lib/mcollective/validator/bolt_task_name_validator.rb', line 4 def self.validate(name) Validator.typecheck(name, :string) raise("'%s' is not a valid Bolt Task name" % name) unless name =~ /\A([a-z][a-z0-9_]*)?(::[a-z][a-z0-9_]*)*\Z/ end |