Sha256: 9f49f51891a691ce7bb7fd5cc769828d868569e9b713b2119191ede5be2fbb6a
Contents?: true
Size: 511 Bytes
Versions: 7
Compression:
Stored size: 511 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) rescue @changes.first else @changes end end end end
Version data entries
7 entries across 7 versions & 1 rubygems