class ArgumentSpecification::Matchers::Match
Attributes
expected[R]
Public Class Methods
new(expected)
click to toggle source
Create a new matcher instance
Arguments:
expected: (Object)
Example:
>> ArgumentSpecification::Matchers::Match.new(Symbol) => #<ArgumentSpecification::Matchers::Match:0x00000000000000 @expected=Symbol>
# File lib/argspec/matchers/match.rb, line 17 def initialize(expected) @expected = expected end
Public Instance Methods
matches?()
click to toggle source
Check if the actual object matches
Example:
>> matcher.matches? => true
# File lib/argspec/matchers/match.rb, line 27 def matches? @actual =~ @expected end