Sha256: dc746213a2fa0bfed02113af247409e5ca2d202412a30a8d7d80b04e76f8907a
Contents?: true
Size: 730 Bytes
Versions: 23
Compression:
Stored size: 730 Bytes
Contents
module Gobstones module WithRenderer def render_success_output(output) result = output[:result] renderer.render_success initial: result[:initialBoard], final: result[:finalBoard] || 'boom', reason: result[:finalBoardError] end def build_error_output(builder, example, _, error) error.details.deep_symbolize_keys! builder.result = renderer.send "render_error_#{error.message}", error.details builder.summary_type = error.message builder.summary_message = I18n.t error.message, error.details end private def renderer @renderer ||= Gobstones::HtmlRenderer.new(@options) end end end
Version data entries
23 entries across 23 versions & 1 rubygems