Sha256: dcb399054487f47a3fda4eca12b022ff9a5c3e9d60b80fed7fecb5291d7be820
Contents?: true
Size: 699 Bytes
Versions: 37
Compression:
Stored size: 699 Bytes
Contents
# Toplevel Pubnub module. module Pubnub # Validator module that holds all validators modules module Validator # Validator for Leave event module Leave include CommonValidator def validate! return if @skip_validate validate_channel_and_group! end def validate_channel_and_group! return unless @channel.empty? && @group.empty? && @wildcard_channel.empty? raise( ArgumentError.new( object: self, message: 'You have to specify :channel or :group while using Leave event.' ), 'You have to specify :channel or :group while using Leave event.' ) end end end end
Version data entries
37 entries across 37 versions & 1 rubygems