Class: StringHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/handy_apn/string_helper.rb

Class Method Summary collapse

Class Method Details

.is_valid(string_to_check) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/handy_apn/string_helper.rb', line 2

def self.is_valid(string_to_check)
	result = true

	if string_to_check.nil? ||
		string_to_check.length == 0

		result = false

	elsif string_to_check.downcase == "nil"
		string_to_check.downcase == "null"
		
		result = false

	end

	result
end