Sha256: 3b8c636843050d930822e4195bef1112b7d1a762a258254b458395e3b40114bd

Contents?: true

Size: 501 Bytes

Versions: 14

Compression:

Stored size: 501 Bytes

Contents

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

      def validate!
        return if @skip_validate
        validate_ttl!
      end

      private

      def validate_ttl!
        return unless !@ttl.nil? && !@ttl.is_a?(Integer)
        raise(
          ArgumentError.new,
          ':ttl has to be kind of Integer'
        )
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
pubnub-4.3.0 lib/pubnub/validators/grant.rb
pubnub-4.2.7 lib/pubnub/validators/grant.rb
pubnub-4.2.6 lib/pubnub/validators/grant.rb
pubnub-4.2.5 lib/pubnub/validators/grant.rb
pubnub-4.2.4 lib/pubnub/validators/grant.rb
pubnub-4.2.3 lib/pubnub/validators/grant.rb
pubnub-4.2.2 lib/pubnub/validators/grant.rb
pubnub-4.2.1 lib/pubnub/validators/grant.rb
pubnub-4.2.0 lib/pubnub/validators/grant.rb
pubnub-4.1.6 lib/pubnub/validators/grant.rb
pubnub-4.1.5 lib/pubnub/validators/grant.rb
pubnub-4.1.2 lib/pubnub/validators/grant.rb
pubnub-4.1.0 lib/pubnub/validators/grant.rb
pubnub-4.0.28 lib/pubnub/validators/grant.rb