class ArgumentSpecification::Matchers::RespondTo
Attributes
expected[R]
Public Class Methods
new(expected)
click to toggle source
Create a new matcher instance
Arguments:
expected: (Symbol)
Example:
>> ArgumentSpecification::Matchers::RespondTo.new(:hello) => #<ArgumentSpecification::Matchers::RespondTo:0x00000000000000 @expected=:hello>
# File lib/argspec/matchers/respond_to.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/respond_to.rb, line 27 def matches? @actual.respond_to?(@expected) end