Class: SportDb::Model::Game
- Inherits:
-
Object
- Object
- SportDb::Model::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
44 |
# File 'lib/sportdb/play/models/game.rb', line 44 def complete_tips() tips.complete; end |
#complete_tips_1 ⇒ Object
45 |
# File 'lib/sportdb/play/models/game.rb', line 45 def complete_tips_1() tips.complete1.order( 'score1 desc,score2 desc'); end |
#complete_tips_2 ⇒ Object
46 |
# File 'lib/sportdb/play/models/game.rb', line 46 def complete_tips_2() tips.complete2.order( 'score2 desc,score1 desc'); end |
#complete_tips_x ⇒ Object
47 |
# File 'lib/sportdb/play/models/game.rb', line 47 def complete_tips_x() tips.completex.order( 'score1 desc,score2 desc'); end |
#incomplete_tips ⇒ Object
49 |
# File 'lib/sportdb/play/models/game.rb', line 49 def incomplete_tips() tips.incomplete; end |
#job_done! ⇒ Object
21 22 23 |
# File 'lib/sportdb/play/models/game.rb', line 21 def job_done! @job_running = false end |
#job_running! ⇒ Object
move to sport.db gem ? why? why not?
17 18 19 |
# File 'lib/sportdb/play/models/game.rb', line 17 def job_running! @job_running = true end |
#job_running? ⇒ Boolean
25 26 27 |
# File 'lib/sportdb/play/models/game.rb', line 25 def job_running? (@job_running ||= false) == true end |
#tip_12x_count ⇒ Object
55 |
# File 'lib/sportdb/play/models/game.rb', line 55 def tip_12x_count() tips.complete.count(); end |
#tip_1_count ⇒ Object
51 |
# File 'lib/sportdb/play/models/game.rb', line 51 def tip_1_count() tips.complete1.count(); end |
#tip_1_style_class ⇒ Object
37 |
# File 'lib/sportdb/play/models/game.rb', line 37 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??
56 |
# File 'lib/sportdb/play/models/game.rb', line 56 def tip_1x2_count() tips.complete.count(); end |
#tip_2_count ⇒ Object
52 |
# File 'lib/sportdb/play/models/game.rb', line 52 def tip_2_count() tips.complete2.count(); end |
#tip_2_style_class ⇒ Object
38 |
# File 'lib/sportdb/play/models/game.rb', line 38 def tip_2_style_class() toto1x2 == '2' ? ' bingo ' : ' '; end |
#tip_x_count ⇒ Object
53 |
# File 'lib/sportdb/play/models/game.rb', line 53 def tip_x_count() tips.completex.count(); end |
#tip_x_style_class ⇒ Object
39 |
# File 'lib/sportdb/play/models/game.rb', line 39 def tip_x_style_class() toto1x2 == 'X' ? ' bingo ' : ' '; end |