Module: Xqsr3::StringUtilities::NilIfEmpty

Included in:
String
Defined in:
lib/xqsr3/string_utilities/nil_if_empty.rb

Defined Under Namespace

Modules: NilIfEmpty_Helper_

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.string_nil_if_empty(s) ⇒ Object

Returns nil if the given string is empty, otherwise returning the given string

Parameters

  • *Required parameters*:

    • s
      String

      The string to be evaluated



78
79
80
81
# File 'lib/xqsr3/string_utilities/nil_if_empty.rb', line 78

def self.string_nil_if_empty s

	NilIfEmpty_Helper_.string_nil_if_empty_array_ s
end

Instance Method Details

#nil_if_emptyObject



83
84
85
86
# File 'lib/xqsr3/string_utilities/nil_if_empty.rb', line 83

def nil_if_empty

	NilIfEmpty_Helper_.string_nil_if_empty_array_ self
end