Class: CamelTrail::EntryPresenter

Inherits:
Object
  • Object
show all
Defined in:
lib/camel_trail/entry_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(history) ⇒ EntryPresenter

Returns a new instance of EntryPresenter.



16
17
18
# File 'lib/camel_trail/entry_presenter.rb', line 16

def initialize(history)
  @history = history
end

Instance Method Details

#describe_changesObject

Details the changes made to the source object.



21
22
23
24
25
# File 'lib/camel_trail/entry_presenter.rb', line 21

def describe_changes
  @history.source_changes.map do |field, change|
    describe_change(field, change)
  end
end