Class: Wildcard::TypeWildcard
- Defined in:
- lib/like_structure/wildcard.rb
Instance Method Summary collapse
-
#initialize(type) ⇒ TypeWildcard
constructor
A new instance of TypeWildcard.
- #reverse_like?(actual) ⇒ Boolean
Constructor Details
#initialize(type) ⇒ TypeWildcard
Returns a new instance of TypeWildcard.
5 6 7 |
# File 'lib/like_structure/wildcard.rb', line 5 def initialize(type) @type = type end |
Instance Method Details
#reverse_like?(actual) ⇒ Boolean
9 10 11 |
# File 'lib/like_structure/wildcard.rb', line 9 def reverse_like?(actual) actual.kind_of?(@type) end |