Move instance method below constant and class method
This commit is contained in:
parent
1a27a404f5
commit
f26900a5d9
1 changed files with 16 additions and 16 deletions
|
@ -44,22 +44,6 @@ module Mutant
|
|||
# Equality based attribute predicate
|
||||
class Equality < self
|
||||
|
||||
# Test for match
|
||||
#
|
||||
# @param [Object] object
|
||||
#
|
||||
# @return [true]
|
||||
# if attribute value matches expectation
|
||||
#
|
||||
# @return [false]
|
||||
# otherwise
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def match?(object)
|
||||
expectation.eql?(value(object))
|
||||
end
|
||||
|
||||
PATTERN = /\A(code):([[:xdigit:]]{1,6})\z/.freeze
|
||||
|
||||
# Test if class handles string
|
||||
|
@ -80,6 +64,22 @@ module Mutant
|
|||
new(match[1].to_sym, match[2])
|
||||
end
|
||||
|
||||
# Test for match
|
||||
#
|
||||
# @param [Object] object
|
||||
#
|
||||
# @return [true]
|
||||
# if attribute value matches expectation
|
||||
#
|
||||
# @return [false]
|
||||
# otherwise
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def match?(object)
|
||||
expectation.eql?(value(object))
|
||||
end
|
||||
|
||||
end # Equality
|
||||
end # Attribute
|
||||
end # Filter
|
||||
|
|
Loading…
Reference in a new issue