Sha256: e297ccd315fe88b098090253f2944be8d52522025494ccd2ed41c4bb08c10edb

Contents?: true

Size: 663 Bytes

Versions: 37

Compression:

Stored size: 663 Bytes

Contents

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

      def validate!
        return if @skip_validate
        validate_channel!
      end

      private

      def validate_channel!
        return unless @channel.size > 1
        raise(
          ArgumentError.new(
            object: self,
            message: 'Invalid :channel. You can run History for a single channel at once.'
          ),
          'Invalid :channel. You can run History for a single channel at once.'
        )
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
pubnub-5.5.0 lib/pubnub/validators/history.rb
pubnub-5.4.0 lib/pubnub/validators/history.rb
pubnub-5.3.5 lib/pubnub/validators/history.rb
pubnub-5.3.4 lib/pubnub/validators/history.rb
pubnub-5.3.3 lib/pubnub/validators/history.rb
pubnub-5.3.2 lib/pubnub/validators/history.rb
pubnub-5.3.1 lib/pubnub/validators/history.rb
pubnub-5.3.0 lib/pubnub/validators/history.rb
pubnub-5.2.2 lib/pubnub/validators/history.rb
pubnub-5.2.1 lib/pubnub/validators/history.rb
pubnub-5.2.0 lib/pubnub/validators/history.rb
pubnub-5.1.2 lib/pubnub/validators/history.rb
pubnub-5.1.1 lib/pubnub/validators/history.rb
pubnub-5.1.0 lib/pubnub/validators/history.rb
pubnub-5.0.0 lib/pubnub/validators/history.rb
pubnub-4.8.0 lib/pubnub/validators/history.rb
pubnub-4.7.1 lib/pubnub/validators/history.rb
pubnub-4.7.0 lib/pubnub/validators/history.rb
pubnub-4.6.2 lib/pubnub/validators/history.rb
pubnub-4.6.1 lib/pubnub/validators/history.rb