Class: StringUtilityBelt::General::GENERAL

Inherits:
Object
  • Object
show all
Defined in:
lib/string_utility_belt/general.rb

Constant Summary

CASE_INSENSITIVE_OPT =
{:case_insensitive => true}

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ GENERAL

Returns a new instance of GENERAL



8
9
10
# File 'lib/string_utility_belt/general.rb', line 8

def initialize(string)
  @string = string
end

Instance Method Details

#have_this_words?(words_to_match, options) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
16
17
18
19
20
# File 'lib/string_utility_belt/general.rb', line 12

def have_this_words?(words_to_match, options)
  @arguments = options

  for word in words_to_match
    return false if not word_is_found_in_the_string?(word)
  end

  return true
end