Class RR::WildcardMatchers::IsA
In: lib/rr/wildcard_matchers/is_a.rb
Parent: Object

Methods

==   eql?   inspect   new   wildcard_match?  

Attributes

klass  [R] 

Public Class methods

[Source]

   # File lib/rr/wildcard_matchers/is_a.rb, line 6
6:       def initialize(klass)
7:         @klass = klass
8:       end

Public Instance methods

[Source]

    # File lib/rr/wildcard_matchers/is_a.rb, line 18
18:       def ==(other)
19:         return false unless other.is_a?(self.class)
20:         self.klass == other.klass
21:       end
eql?(other)

Alias for #==

[Source]

    # File lib/rr/wildcard_matchers/is_a.rb, line 14
14:       def inspect
15:         "is_a(#{klass})"
16:       end

[Source]

    # File lib/rr/wildcard_matchers/is_a.rb, line 10
10:       def wildcard_match?(other)
11:         self == other || other.is_a?(klass)
12:       end

[Validate]