Module: Falsework::Utils

Extended by:
Utils
Included in:
Utils
Defined in:
lib/falsework/utils.rb

Class Method Summary collapse

Class Method Details

.all_set?(t) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/falsework/utils.rb', line 5

def self.all_set? t
  return false unless t
  
  if t.is_a?(Array)
    return false if t.size == 0
    
    t.each {|i|
      return false unless i
      return false if i.to_s.strip.size == 0
    }
  end
  
  return false if t.to_s.strip.size == 0
  true
end