Class | Spec::Mocks::DuckTypeArgConstraint
In: | lib/spec/mocks/argument_expectation.rb
Parent: | Object

### Methods

description matches? new

### Public Class methods

new(*methods_to_respond_to)

[Source]

         # File lib/spec/mocks/argument_expectation.rb, line 99
     99:       def initialize(*methods_to_respond_to)
    100:         @methods_to_respond_to = methods_to_respond_to
    101:       end

### Public Instance methods

description()

[Source]

         # File lib/spec/mocks/argument_expectation.rb, line 107
    107:       def description
    108:         "duck_type"
    109:       end

matches?(value)

[Source]

         # File lib/spec/mocks/argument_expectation.rb, line 103
    103:       def matches?(value)
    104:         @methods_to_respond_to.all? { |sym| value.respond_to?(sym) }
    105:       end

[Validate]