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