Sha256: 4ed6aafa3cda55e06103fd99e74551fa3ff2921e2d36a095790f3c21cc60e6f6
Contents?: true
Size: 338 Bytes
Versions: 3
Compression:
Stored size: 338 Bytes
Contents
module Livefyre class SiteValidator def self.validate(data) reason = '' reason += '\n Id is null or blank.' if data.id.to_s.empty? reason += '\n Key is null or blank.' if data.key.to_s.empty? raise ArgumentError, "Problems with your site input: #{reason}" if reason.length > 0 data end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
livefyre-2.0.2 | lib/livefyre/validator/site_validator.rb |
livefyre-2.0.1 | lib/livefyre/validator/site_validator.rb |
livefyre-2.0.0 | lib/livefyre/validator/site_validator.rb |