Sha256: a8ed17e6ddab3a6aaacd0d9c0cb98ac77391b0a4890449d0899dd86e2894ead2
Contents?: true
Size: 609 Bytes
Versions: 19
Compression:
Stored size: 609 Bytes
Contents
module Pubnub module Validator def valid_channel?(allow_array = true) valid = true if @channel.is_a? Array if allow_array @channel.each do |channel| unless channel.is_a?(String) || channel.is_a?(Symbol) valid = false break end end else valid = false end else if !@channel.is_a?(String) && !@channel.is_a?(Symbol) valid = false elsif @channel.to_s.index(',') && !allow_array valid = false end end valid end end end
Version data entries
19 entries across 19 versions & 1 rubygems