Sha256: 9422e431d9c4a72d855c7af7570b7d8ca82fd7414f39a8c691fa2bec00b0c2ce
Contents?: true
Size: 834 Bytes
Versions: 14
Compression:
Stored size: 834 Bytes
Contents
# Toplevel Pubnub module. module Pubnub # Validator module that holds all validators modules module Validator # Validator for Grant event module RevokeToken include CommonValidator def validate! validate_keys! validate_token! end private def validate_keys! raise( ArgumentError.new(object: self, message: ':subscribe_key is required for revoke token event.'), ':subscribe_key is required for grant token event.' ) if @subscribe_key.nil? || @subscribe_key.empty? end def validate_token! raise( ArgumentError.new(object: self, message: ':token is required for revoke token event.'), ':token is required for revoke token event.' ) if @token.nil? || @token.empty? end end end end
Version data entries
14 entries across 14 versions & 1 rubygems