lib/rank.rb
# Returns the value based on the weighted value of both the critic and
# user rating. Is weighted towards what the critic thinks.
Returns the value based on the weighted value of both the critic and
user rating. Is weighted towards what the critic thinks.
Returns the value based on the weighted value of both the critic and user rating . Is weighted towards what the critic thinks .
def value
    values = [@critic, @critic, @user].collect(&:weighted_value).compact
    if values.size > 0
      values.sum.to_f / values.size
    else
      0
    end
  end
def value values = [ @critic , @critic , @user ] . collect ( & :weighted_value ) . compact if values . size > 0 values . sum . to_f / values . size else 0 end end
Returns the value based on the weighted value of both the critic and
user rating.
Returns the value based on the weighted value of both the critic and user rating .