Class: Minicrest::HashEntryMatcher Private
- Defined in:
- lib/minicrest/hash_entry_matchers.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Base class for matchers that check entries in a Hash.
Direct Known Subclasses
Instance Method Summary collapse
-
#hash?(actual) ⇒ Boolean
private
Checks if actual is a Hash.
-
#initialize(entry_matcher) ⇒ HashEntryMatcher
constructor
private
Creates a new hash entry matcher.
Methods inherited from Matcher
#&, #description, #failure_message, #matches?, #negated_failure_message, #|
Constructor Details
#initialize(entry_matcher) ⇒ HashEntryMatcher
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new hash entry matcher.
13 14 15 16 |
# File 'lib/minicrest/hash_entry_matchers.rb', line 13 def initialize(entry_matcher) super() @entry_matcher = entry_matcher end |
Instance Method Details
#hash?(actual) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Checks if actual is a Hash.
22 23 24 |
# File 'lib/minicrest/hash_entry_matchers.rb', line 22 def hash?(actual) actual.is_a?(Hash) end |