Method: Cucumber::Formatter::Console#format_string

Defined in:
lib/cucumber/formatter/console.rb

#format_string(o, status) ⇒ Object



46
47
48
49
50
51
52
53
54
55
# File 'lib/cucumber/formatter/console.rb', line 46

def format_string(o, status)
  fmt = format_for(status)
  o.to_s.split("\n").map do |line|
    if Proc === fmt
      fmt.call(line)
    else
      fmt % line
    end
  end.join("\n")
end