Module: GrabzIt::Utility Private

Defined in:
lib/grabzit/utility.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.b_to_str(bValue) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4
5
6
7
8
9
# File 'lib/grabzit/utility.rb', line 4

def self.b_to_str(bValue)
	if bValue
		return 1.to_s
	end
	return 0.to_s
end

.nil_check(param) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
14
15
16
# File 'lib/grabzit/utility.rb', line 11

def self.nil_check(param)
	if param == nil
		return ""
	end
	return param
end

.nil_float_check(param) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



22
23
24
25
26
27
28
29
# File 'lib/grabzit/utility.rb', line 22

def self.nil_float_check(param)
	val = param.to_f
	if ((val % 1) == 0)
		return val.to_i.to_s
	end
	
	return val.to_s
end

.nil_int_check(param) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/grabzit/utility.rb', line 18

def self.nil_int_check(param)
	return param.to_i.to_s
end