Module: Comparison::ApplicationHelper
- Defined in:
- app/helpers/comparison/application_helper.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#compare(value, other) {|comparison| ... } ⇒ Object
Returns a Presenter for a Comparator for
valueandother.
Instance Method Details
#compare(value, other) {|comparison| ... } ⇒ Object
Returns a Presenter for a Comparator for value and other.
If a block is given, the Presenter is yielded to the block.
9 10 11 12 13 |
# File 'app/helpers/comparison/application_helper.rb', line 9 def compare(value, other) comparison = Presenter.new Comparator.new value, other yield comparison if block_given? comparison end |