Sha256: 7def89a399cba1d5e769228b8f072be8179394b5959775cf7457c5f1a438aa78

Contents?: true

Size: 715 Bytes

Versions: 62

Compression:

Stored size: 715 Bytes

Contents

# Toplevel Pubnub module.
module Pubnub
  # Validator module that holds all validators modules
  module Validator
    # Validator for Subscribe event
    module Subscribe
      include CommonValidator

      def validate!
        return if @skip_validate
        validate_channels!
      end

      private

      def validate_channels!
        # fail(
        #   ArgumentError.new(
        #     object: self,
        #     message: 'You have to specify :channel or :group while using Subscribe event.'
        #   ),
        #   'You have to specify :channel or :group while using Subscribe event.'
        # ) if @channel.size == 0 && @group.size == 0 && @wildcard_channel.size == 0
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
pubnub-4.0.0beta2 lib/pubnub/validators/subscribe.rb
pubnub-4.0.0beta1 lib/pubnub/validators/subscribe.rb