Module: Ruuuby::Feature::Includable::StringF09
- Included in:
- String
- Defined in:
- lib/ruuuby/class/str/str.rb
Overview
defines the operations needed to support Feature(f09) that are applied to Class(String)
Instance Method Summary collapse
-
#∈?(them) ⇒ Boolean
True, if this string instance is contained in the provided str (or array/set).
-
#∉?(them) ⇒ Boolean
True, if this string instance is not contained in the provided str (or array/set).
-
#∋?(them) ⇒ Boolean
True, if this string instance contains the provided str.
-
#∌?(them) ⇒ Boolean
True, if this string instance contains the provided str.
Instance Method Details
#∈?(them) ⇒ Boolean
Returns true, if this string instance is contained in the provided str (or array/set).
164 165 166 167 |
# File 'lib/ruuuby/class/str/str.rb', line 164 def ∈?(them) 🛑 ArgumentError.new("| c{String}-> m{∈?} will only accept args of type{String, Array, Set}, not the provided type{#{them.Ⓣ}} from arg{#{them.to_s}} |") unless (them.str? || them.ary? || them.is_a?(Set)) them.∋?(self) end |
#∉?(them) ⇒ Boolean
Returns true, if this string instance is not contained in the provided str (or array/set).
154 155 156 157 |
# File 'lib/ruuuby/class/str/str.rb', line 154 def ∉?(them) 🛑 ArgumentError.new("| c{String}-> m{∉?} will only accept args of type{String, Array, Set}, not the provided type{#{them.Ⓣ}} from arg{#{them.to_s}} |") unless (them.str? || them.ary? || them.is_a?(Set)) them.∌?(self) end |
#∋?(them) ⇒ Boolean
Returns true, if this string instance contains the provided str.
140 |
# File 'lib/ruuuby/class/str/str.rb', line 140 def ∋?(them); 🛑str❓(:them, them); self.include?(them); end |
#∌?(them) ⇒ Boolean
Returns true, if this string instance contains the provided str.
147 |
# File 'lib/ruuuby/class/str/str.rb', line 147 def ∌?(them); 🛑str❓(:them, them); not self.include?(them); end |