module MetricsHelper::LinkCheckerHelper

  def response_td(response)
    success = response.is_a?(Fixnum) and response >= 200 and response < 300
    cls = success ? 'successful' : 'unsuccessful'
    content_tag(:td, response, class: cls)
  end

end

module MetricsHelper::LinkCheckerHelper

  def response_td(response)
    success = response.is_a?(Fixnum) && response >= 200 && response < 300
    cls = success ? 'successful' : 'unsuccessful'
    content_tag(:td, response, class: cls)
  end

end

Fix success determination for response code
Fix success determination for response code

I used the (and) operator which has a lower precedence than the
assignment operator (=), hence I have replaced it with the (&&)
operator.

Signed-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>
