Class: SportDb::Models::Game
- Inherits:
-
Object
- Object
- SportDb::Models::Game
- Defined in:
- lib/sportdb/play/models/game.rb
Overview
NB: extend Game model from sport.db gem
Instance Method Summary collapse
-
#complete_tips ⇒ Object
some methods for stats.
- #complete_tips_1 ⇒ Object
- #complete_tips_2 ⇒ Object
- #complete_tips_x ⇒ Object
- #incomplete_tips ⇒ Object
- #job_done! ⇒ Object
-
#job_running! ⇒ Object
move to sport.db gem ? why? why not?.
- #job_running? ⇒ Boolean
- #tip_12x_count ⇒ Object
- #tip_1_count ⇒ Object
- #tip_1_style_class ⇒ Object
-
#tip_1x2_count ⇒ Object
alias for tip_12x_count // or just add/use tip_count add too??.
- #tip_2_count ⇒ Object
- #tip_2_style_class ⇒ Object
- #tip_x_count ⇒ Object
- #tip_x_style_class ⇒ Object
Instance Method Details
#complete_tips ⇒ Object
some methods for stats
51 |
# File 'lib/sportdb/play/models/game.rb', line 51 def complete_tips() tips.complete; end |
#complete_tips_1 ⇒ Object
52 |
# File 'lib/sportdb/play/models/game.rb', line 52 def complete_tips_1() tips.complete1.order( 'score1 desc,score2 desc'); end |
#complete_tips_2 ⇒ Object
53 |
# File 'lib/sportdb/play/models/game.rb', line 53 def complete_tips_2() tips.complete2.order( 'score2 desc,score1 desc'); end |
#complete_tips_x ⇒ Object
54 |
# File 'lib/sportdb/play/models/game.rb', line 54 def complete_tips_x() tips.completex.order( 'score1 desc,score2 desc'); end |
#incomplete_tips ⇒ Object
56 |
# File 'lib/sportdb/play/models/game.rb', line 56 def incomplete_tips() tips.incomplete; end |
#job_done! ⇒ Object
20 21 22 |
# File 'lib/sportdb/play/models/game.rb', line 20 def job_done! @job_running = false end |
#job_running! ⇒ Object
move to sport.db gem ? why? why not?
16 17 18 |
# File 'lib/sportdb/play/models/game.rb', line 16 def job_running! @job_running = true end |
#job_running? ⇒ Boolean
24 25 26 |
# File 'lib/sportdb/play/models/game.rb', line 24 def job_running? (@job_running ||= false) == true end |
#tip_12x_count ⇒ Object
62 |
# File 'lib/sportdb/play/models/game.rb', line 62 def tip_12x_count() tips.complete.count(); end |
#tip_1_count ⇒ Object
58 |
# File 'lib/sportdb/play/models/game.rb', line 58 def tip_1_count() tips.complete1.count(); end |
#tip_1_style_class ⇒ Object
36 37 38 |
# File 'lib/sportdb/play/models/game.rb', line 36 def tip_1_style_class toto1x2 == '1' ? ' bingo ' : ' ' end |
#tip_1x2_count ⇒ Object
alias for tip_12x_count // or just add/use tip_count add too??
63 |
# File 'lib/sportdb/play/models/game.rb', line 63 def tip_1x2_count() tips.complete.count(); end |
#tip_2_count ⇒ Object
59 |
# File 'lib/sportdb/play/models/game.rb', line 59 def tip_2_count() tips.complete2.count(); end |
#tip_2_style_class ⇒ Object
40 41 42 |
# File 'lib/sportdb/play/models/game.rb', line 40 def tip_2_style_class toto1x2 == '2' ? ' bingo ' : ' ' end |
#tip_x_count ⇒ Object
60 |
# File 'lib/sportdb/play/models/game.rb', line 60 def tip_x_count() tips.completex.count(); end |
#tip_x_style_class ⇒ Object
44 45 46 |
# File 'lib/sportdb/play/models/game.rb', line 44 def tip_x_style_class toto1x2 == 'X' ? ' bingo ' : ' ' end |