Module: Xqsr3::StringUtilities::EndsWith

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

Overview

include-able module that provides ::string_ends_with? and #ends_with? methods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.string_ends_with?(s, *args) ⇒ Boolean

Reports on whether a string s ends with a given prefix or set of prefixes (args)

Signature

  • Parameters:

    • s (String) The string to be evaluated;

    • args 0+ arguments against which s will be evaluated;

Returns:

  • (Boolean)


120
121
122
123
# File 'lib/xqsr3/string_utilities/ends_with.rb', line 120

def self.string_ends_with? s, *args

  EndsWith_Helper_.string_ends_with_array_ s, args
end

Instance Method Details

#ends_with?(*args) ⇒ Boolean

Reports on whether the instance ends with a given prefix or set of prefixes (args)

Signature

  • Parameters:

    • args 0+ arguments against which the instance will be evaluated

Returns:

  • (Boolean)


132
133
134
135
# File 'lib/xqsr3/string_utilities/ends_with.rb', line 132

def ends_with? *args

  EndsWith_Helper_.string_ends_with_array_ self, args
end