wraps any object having === method into matcher
# File lib/algebrick/matchers/wrapper.rb, line 19 def self.call(something) new something end
# File lib/algebrick/matchers/wrapper.rb, line 25 def initialize(something) super() @something = matchable! something end
# File lib/algebrick/matchers/wrapper.rb, line 38 def ==(other) other.kind_of? self.class and self.something == other.something end
# File lib/algebrick/matchers/wrapper.rb, line 30 def children find_children [@something] end
# File lib/algebrick/matchers/wrapper.rb, line 34 def to_s assign_to_s + "Wrapper.(#{@something})" end
# File lib/algebrick/matchers/wrapper.rb, line 45 def matching?(other) @something === other end