Class: Wildcard::TypeWildcard

Inherits:
Wildcard show all
Defined in:
lib/like_structure/wildcard.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


9
10
11
# File 'lib/like_structure/wildcard.rb', line 9

def reverse_like?(actual)
  actual.kind_of?(@type)
end