Module: Xqsr3::HashUtilities::KeyMatching
- Defined in:
- lib/xqsr3/hash_utilities/key_matching.rb
Class Method Summary collapse
-
.has_match?(h, re, **options) ⇒ Boolean
Returns true if the hash
h
contains a key object that matches the givenre
, according to the given options. -
.match(h, re, **options) ⇒ Object
Retrieves the value object corresponding to the first key object that matches the given
re
, in the hashh
, according to the given options.
Instance Method Summary collapse
-
#has_match?(h, re, **options) ⇒ Boolean
Returns true if the hash
h
contains a key object that matches the givenre
, according to the given options. -
#match(h, re, **options) ⇒ Object
Retrieves the value object corresponding to the first key object that matches the given
re
, in the hashh
, according to the given options.
Class Method Details
.has_match?(h, re, **options) ⇒ Boolean
Returns true if the hash h
contains a key object that matches the given re
, according to the given options
149 150 151 152 |
# File 'lib/xqsr3/hash_utilities/key_matching.rb', line 149 def self.has_match? h, re, ** Xqsr3::HashUtilities::KeyMatching.do_has_match_ h, re, ** end |
.match(h, re, **options) ⇒ Object
Retrieves the value object corresponding to the first key object that matches the given re
, in the hash h
, according to the given options.
142 143 144 145 |
# File 'lib/xqsr3/hash_utilities/key_matching.rb', line 142 def self.match h, re, ** Xqsr3::HashUtilities::KeyMatching.do_match_ h, re, ** end |
Instance Method Details
#has_match?(h, re, **options) ⇒ Boolean
Returns true if the hash h
contains a key object that matches the given re
, according to the given options
164 165 166 167 |
# File 'lib/xqsr3/hash_utilities/key_matching.rb', line 164 def has_match? h, re, ** Xqsr3::HashUtilities::KeyMatching.do_has_match_ h, re, ** end |
#match(h, re, **options) ⇒ Object
Retrieves the value object corresponding to the first key object that matches the given re
, in the hash h
, according to the given options.
157 158 159 160 |
# File 'lib/xqsr3/hash_utilities/key_matching.rb', line 157 def match h, re, ** Xqsr3::HashUtilities::KeyMatching.do_match_ h, re, ** end |