noinspection RubyClassModuleNamingConvention
# File lib/algebrick/matchers/or.rb, line 19 def to_s matchers.join ' | ' end
# File lib/algebrick/matchers/or.rb, line 32 def children super.select &:matched? end
# File lib/algebrick/matchers/or.rb, line 25 def matching?(other) matchers.any? { |m| m === other } end
# File lib/algebrick/matchers/or.rb, line 45 def assigns_size # TODO is it efficient? super_children.map { |ch| ch.assigns.size }.max end
# File lib/algebrick/matchers/or.rb, line 38 def collect_assigns super.tap do |assigns| missing = assigns_size - assigns.size assigns.push(*::Array.new(missing)) end end