Class: Flexite::DiffPresenter

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/presenters/flexite/diff_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(template, type, depth, *changes) ⇒ DiffPresenter

Returns a new instance of DiffPresenter.



3
4
5
6
7
8
# File 'app/presenters/flexite/diff_presenter.rb', line 3

def initialize(template, type, depth, *changes)
  @type = type
  @depth = depth
  @changes = changes
  super(template)
end

Instance Method Details

#to_viewObject



10
11
12
# File 'app/presenters/flexite/diff_presenter.rb', line 10

def to_view
  "PATH: #{@depth}\r#{t("labels.diff.operations.#{@type}") % prettified}"
end