score-formats 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/score-formats/score.rb +10 -1
- data/lib/score-formats/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ef82109923fdb693e95df7d2f82848e40ffde8e
|
4
|
+
data.tar.gz: 6858a51bb836ee2cfae92bd7af3a5770738f473a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9d95d3ad959df4c5c1cf38592a4dad641869296bdfd1e6ebc853bf845165fa56f2f419e6dc7f4062fcdcd9f23c2b72ac2cf4261b2fe4f025f940290faff5833
|
7
|
+
data.tar.gz: 7550934439640f17f55e6e6151941f69061082bd96c90a8ce1343a90f4c7603832c2e1cfca3b139efcaa2febd56ad9f32366cbeb1c018050c92b90a9d974a3b8
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ Hoe.spec 'score-formats' do
|
|
8
8
|
self.summary = "score-formats - read / parse and print sports match scores (incl. half time, full time, extra time, penalties and more)"
|
9
9
|
self.description = summary
|
10
10
|
|
11
|
-
self.urls =
|
11
|
+
self.urls = { home: 'https://github.com/sportdb/sport.db' }
|
12
12
|
|
13
13
|
self.author = 'Gerald Bauer'
|
14
14
|
self.email = 'opensport@googlegroups.com'
|
data/lib/score-formats/score.rb
CHANGED
@@ -53,6 +53,11 @@ class Score
|
|
53
53
|
def p() [@score1p, @score2p]; end ## e.g. note - starts "fresh" score from 0-0
|
54
54
|
alias_method :pen, :p ## add alias - why? why not?
|
55
55
|
|
56
|
+
alias_method :full_time, :ft
|
57
|
+
alias_method :half_time, :ht
|
58
|
+
alias_method :extra_time, :et
|
59
|
+
alias_method :penalties, :p ## penalties - use a different word(ing)? why? why not?
|
60
|
+
|
56
61
|
## todo/check: allow one part missing why? why not?
|
57
62
|
## e.g. 1-nil or nil-1 - why? why not?
|
58
63
|
def ft?() @score1 && @score2; end
|
@@ -61,7 +66,11 @@ class Score
|
|
61
66
|
def p?() @score1p && @score2p; end
|
62
67
|
alias_method :pen?, :p?
|
63
68
|
|
64
|
-
|
69
|
+
alias_method :full_time?, :ft?
|
70
|
+
alias_method :half_time?, :ht?
|
71
|
+
alias_method :extra_time?, :et?
|
72
|
+
alias_method :penalties?, :p?
|
73
|
+
|
65
74
|
|
66
75
|
def initialize( *values )
|
67
76
|
## note: for now always assumes integers
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: score-formats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|