Module: Comparison::ApplicationHelper

Defined in:
app/helpers/comparison/application_helper.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#compare(m, n) {|comparison| ... } ⇒ Object

Returns a Presenter for a Comparator for m and n.

If a block is given, the Presenter is yielded to the block.

rubocop:disable Naming/UncommunicativeMethodParamName

Yields:

  • (comparison)


11
12
13
14
15
# File 'app/helpers/comparison/application_helper.rb', line 11

def compare(m, n)
  comparison = Presenter.new Comparator.new m, n
  yield comparison if block_given?
  comparison
end