class ArgumentSpecification::Matchers::Equal

Attributes

expected[R]

Public Class Methods

new(expected) click to toggle source

Create a new matcher instance

Arguments:

expected: (Object)

Example:

>> ArgumentSpecification::Matchers::Equal.new(:test)
=> #<ArgumentSpecification::Matchers::Equal:0x00000000000000 @expected=:test>
# File lib/argspec/matchers/equal.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/equal.rb, line 27
def matches?
  @actual == @expected
end