class SportDb::Model::Point

Public Instance Methods

diff_total_pos_str() click to toggle source
# File lib/sportdb/play/models/point.rb, line 38
def diff_total_pos_str
  ## todo: diff 2 use ⇑⇑
  #        diff 3 use ⇑⇑⇑
  #        diff 4 use ⇑⇑⇑⇑
  # etc.
  
  if diff_total_pos > 0
    "⇑#{diff_total_pos}"
  elsif diff_total_pos < 0
    "⇓#{diff_total_pos.abs}"
  else  # == 0
    ""
  end
end
diff_total_pos_style_class() click to toggle source
# File lib/sportdb/play/models/point.rb, line 28
def diff_total_pos_style_class
  if diff_total_pos > 0
    ' ranking-up '
  elsif diff_total_pos < 0
    ' ranking-down '
  else  # == 0
    ' '
  end
end
round_pts_str() click to toggle source
# File lib/sportdb/play/models/point.rb, line 15
def round_pts_str
  buf = ''
  round_pts.times { buf << '♣' }
  buf
end
total_pts_str() click to toggle source
# File lib/sportdb/play/models/point.rb, line 21
def total_pts_str
  buf = ''
  total_pts.times { buf << '♣' }
  buf
end