In Files

  • test-unit-3.5.3/lib/test/unit/assertions.rb

Parent

Methods

Class/Module Index [+]

Quicksearch

Test::Unit::Assertions::AssertionMessage::MaybeContainer

Public Class Methods

new(value, &formatter) click to toggle source
 
               # File test-unit-3.5.3/lib/test/unit/assertions.rb, line 2201
def initialize(value, &formatter)
  @value = value
  @formatter = formatter
end
            

Public Instance Methods

inspect() click to toggle source
 
               # File test-unit-3.5.3/lib/test/unit/assertions.rb, line 2206
def inspect
  if @value.is_a?(Array)
    values = @value.collect do |value|
      @formatter.call(AssertionMessage.convert(value))
    end
    "[#{values.join(', ')}]"
  else
    @formatter.call(AssertionMessage.convert(@value))
  end
end
            
There is an updated format of the API docs for this version here.