Sha256: 5dc482499c6d95cd3fe028e8f3e2c69d40ca4fcb93bfebe73b282aa7d52f7b76

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

# ReportingCloud Ruby Wrapper
#
# Official wrapper (authored by Text Control GmbH, publisher of ReportingCloud) to access 
# ReportingCloud in Ruby.
#
# Go to http://www.reporting.cloud to learn more about ReportingCloud
# Go to https://github.com/TextControl/txtextcontrol-reportingcloud-ruby for the 
# canonical source repository.
#
# License: https://raw.githubusercontent.com/TextControl/txtextcontrol-reportingcloud-ruby/master/LICENSE.md
#
# Copyright: © 2016 Text Control GmbH

module TXTextControl
  module ReportingCloud
  
    # Internal method parameter validator class.
    # @author Thorsten Kummerow (@thomerow)
    class TemplateNameValidator
    
      # Checks if a given value is a String, is not nil and not empty.
      # @param template_name [String] The string to validate.
      # @return [Boolean]
      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
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
txtextcontrol-reportingcloud-1.0.1 lib/txtextcontrol/reportingcloud/template_name_validator.rb
txtextcontrol-reportingcloud-1.0.0 lib/txtextcontrol/reportingcloud/template_name_validator.rb