Class: EacRubyUtils::Wildcards
- Defined in:
- lib/eac_ruby_utils/wildcards.rb
Overview
The ‘Wildcards` class provides pattern matching with wildcards using regular expressions.
Instance Method Summary collapse
-
#initialize(pattern) ⇒ Wildcards
constructor
Initializes a new instance of the ‘Wildcards` class with the specified pattern.
-
#match? ⇒ Boolean
Matches the given string against the pattern.
Constructor Details
#initialize(pattern) ⇒ Wildcards
Initializes a new instance of the ‘Wildcards` class with the specified pattern.
9 10 11 |
# File 'lib/eac_ruby_utils/wildcards.rb', line 9 def initialize(pattern) @pattern = pattern end |
Instance Method Details
#match? ⇒ Boolean
Matches the given string against the pattern.
17 |
# File 'lib/eac_ruby_utils/wildcards.rb', line 17 delegate :match?, to: :regex |