Module: Loca::Utils

Included in:
Git::BranchCreator, Git::BranchDeleter, Loca::URL::Validator
Defined in:
lib/loca/utils.rb

Class Method Summary collapse

Class Method Details

.non_empty_string?(str) ⇒ Boolean

returns false if str is nil, or not a String, or an empty String

Returns:

  • (Boolean)


4
5
6
7
8
# File 'lib/loca/utils.rb', line 4

def non_empty_string?(str)
  !str.strip.empty?
rescue NameError, NoMethodError
  false
end