Class: Wildcard::AnythingWildcard
- Defined in:
- lib/like_structure/wildcard.rb
Instance Method Summary collapse
-
#initialize(allow_nil) ⇒ AnythingWildcard
constructor
A new instance of AnythingWildcard.
- #reverse_like?(actual) ⇒ Boolean
Constructor Details
#initialize(allow_nil) ⇒ AnythingWildcard
Returns a new instance of AnythingWildcard.
15 16 17 |
# File 'lib/like_structure/wildcard.rb', line 15 def initialize(allow_nil) @allow_nil = allow_nil end |
Instance Method Details
#reverse_like?(actual) ⇒ Boolean
18 19 20 |
# File 'lib/like_structure/wildcard.rb', line 18 def reverse_like?(actual) @allow_nil || !actual.nil? end |