class Algebrick::Matchers::Wrapper
wraps any object having === method into matcher
Attributes
something[R]
Public Class Methods
call(something)
click to toggle source
# File lib/algebrick/matchers/wrapper.rb, line 19 def self.call(something) new something end
new(something)
click to toggle source
Calls superclass method
Algebrick::Matchers::Abstract.new
# File lib/algebrick/matchers/wrapper.rb, line 25 def initialize(something) super() @something = matchable! something end
Public Instance Methods
==(other)
click to toggle source
# File lib/algebrick/matchers/wrapper.rb, line 38 def ==(other) other.kind_of? self.class and self.something == other.something end
children()
click to toggle source
# File lib/algebrick/matchers/wrapper.rb, line 30 def children find_children [@something] end
to_s()
click to toggle source
# File lib/algebrick/matchers/wrapper.rb, line 34 def to_s assign_to_s + "Wrapper.(#{@something})" end
Protected Instance Methods
matching?(other)
click to toggle source
# File lib/algebrick/matchers/wrapper.rb, line 45 def matching?(other) @something === other end