Class: TXTextControl::ReportingCloud::TemplateNameValidator
- Inherits:
-
Object
- Object
- TXTextControl::ReportingCloud::TemplateNameValidator
- Defined in:
- lib/txtextcontrol/reportingcloud/template_name_validator.rb
Overview
Internal method parameter validator class.
Class Method Summary collapse
-
.validate(template_name) ⇒ Boolean
Checks if a given value is a String, is not nil and not empty.
Class Method Details
.validate(template_name) ⇒ Boolean
Checks if a given value is a String, is not nil and not empty.
24 25 26 27 |
# File 'lib/txtextcontrol/reportingcloud/template_name_validator.rb', line 24 def self.validate(template_name) raise ArgumentError, "Template name must be a String." if !template_name.kind_of? String raise ArgumentError, "No template name given." if template_name.to_s.empty? end |