lib/comparison/presenter.rb
def dom_classes
      if positive?
        t 'comparison.dom_classes.positive',
          default: %i[comparison.classes.positive]
      elsif negative?
        t 'comparison.dom_classes.negative',
          default: %i[comparison.classes.negative]
      else
        t 'comparison.dom_classes.nochange',
          default: %i[comparison.classes.nochange]
      end
    end
def dom_classes
      if positive?
        t 'comparison.dom_classes.positive',
          default: %i[comparison.classes.positive]
      elsif negative?
        t 'comparison.dom_classes.negative',
          default: %i[comparison.classes.negative]
      else
        t 'comparison.dom_classes.nochange',
          default: %i[comparison.classes.nochange]
      end
    end
def dom_classes if positive? t 'comparison.dom_classes.positive' , default : %i[ comparison.classes.positive ] elsif negative? t 'comparison.dom_classes.negative' , default : %i[ comparison.classes.negative ] else t 'comparison.dom_classes.nochange' , default : %i[ comparison.classes.nochange ] end end
Returns the I18n translation for `comparison.dom_classes`.

 Use these translations to specify CSS classes for tags that contain
 comparison data. For example:

     en:
       comparison:
         dom_classes:
           positive: 'comparison positive'
           negative: 'comparison negative'
           nochange: 'comparison nochange'

     .comparison.positive {
       color: #3c763d;
       background-color: #dff0d8;
     }
     .comparison.negative {
       color: #a94442;
       background-color: #f2dede;
     }
     .comparison.nochange {
       color: #777777;
     }

     content_tag :span, cmp.difference, class: cmp.dom_classes
     # => "<span class=\"comparison positive\">+10%</span>"

 If you need to work with inline styles instead of CSS classes, see the
 `#style` method.
Returns the I18n translation for comparison . dom_classes .