Sha256: 01374354b0ec80fc112b8d275f5234e499342577031d9449e6f939c00db4c9af
Contents?: true
Size: 492 Bytes
Versions: 9
Compression:
Stored size: 492 Bytes
Contents
module Flexite class DiffPresenter < SimpleDelegator def initialize(template, type, depth, _, *changes) @type = type @depth = depth @changes = changes super(template) end def to_view "PATH: #{@depth}\r#{t("labels.diff.operations.#{@type}") % prettified}" end private def prettified case @type.to_sym when :-, :+ JSON.pretty_generate(@changes.first) else @changes end end end end
Version data entries
9 entries across 9 versions & 1 rubygems