infostrada 0.1.19 → 0.1.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDY0M2RjY2M0NTM1NjcwZDgwODVlMDFhOGIyNzYzNDUzYzMwNmUyNQ==
4
+ ZDkxMTEwYzNiMTcyNWIzYTkxMGNjM2UwMzNjZjhjZTJlZDQ2MzFiYQ==
5
5
  data.tar.gz: !binary |-
6
- MjRjYTE4ZGFhZjg4ODZmN2JlMmQxMDkzOTVkM2E4OGU5MjZlY2YyNA==
6
+ MTNmZTQ1ZjU2NmFjZWIyMmM0Y2Y2MDYxM2MyZTg5N2NmZGE5MDg2Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTNjNzg1YzMxYzkzOTNiOTM4ZTYwY2YwYTZmNjIwMDY4MDAyMWQ1NGY5NTAz
10
- ZDhiN2RlYmQzZjdiMDhkMmNiMmJhZDAyNDFkOWQwMjY1OTRiYzFiNDM2MTA1
11
- NGI3MDk4ZWZiNjk4ODE1OGE3MzYwZWUxZDRiNzgxNzY0ODllODc=
9
+ OTI4MTMzN2E5NTAzMDNiM2JlOGFhNDc4ODUxMTI1NDdlZjVhZDU0ODg4MDE3
10
+ YTdjNDM2NWMwMjlmNjY2YzdiNjllOTRmM2I1OWIzMWQ0MTRjZTg0Y2YzOWJm
11
+ NzIwYjBhMzBiNmUxN2NhYWMxNWE5ZTg4NDJjMWU2NGVkOGRkNzk=
12
12
  data.tar.gz: !binary |-
13
- ODczOWMzMTZkYTYzYjQ2OThiNWU5MTBkYzBkOTAzOGQyNDEwMTBmOTE1NjYw
14
- Y2Y1Nzg5Mjg0NTNhOTMxNDU2MTY5ZDczNzZlYTY2ZTQwZTg1NDUxZTBlZWEw
15
- OWRlMTA4NmZjMWY5MmNjMjE4MjJiODkxZGU5N2Y1NTE5MDA0MGE=
13
+ NTJkNmJkZGIyMmRmNTZiZWI5MDNjZGNlMGMxMWQxOTYyYjc4ODYwZWIyNTYw
14
+ ZmNlODU1Yzk1MTk3MjMxZTk3MTZiYjJiNmNkNmVkOTFlZDFiZmQwYjMzNWVm
15
+ ZGI1ZDA2NjBhMDFiYmM4YjJlOGVhNDlmNTNlYzk3OTI3MzU2Y2M=
@@ -10,16 +10,22 @@ module Infostrada
10
10
  self
11
11
  end
12
12
 
13
- # Helper method to return the match id from the query string.
14
- def match_id
15
- @query_string.match(/matchid=(\d+)/)
16
- $1
13
+ # Defines methods for parameter ids on the c_QueryString. These can be match_id, phase_id,
14
+ # edition_id or team_id.
15
+ %w(match phase edition team).each do |param|
16
+ define_method("#{param}_id") do
17
+ scan_id(param)
18
+ end
17
19
  end
18
20
 
19
- # Helper method to return the phase id from the query string.
20
- def phase_id
21
- @query_string.match(/phaseid=(\d+)/)
22
- $1
21
+ private
22
+
23
+ # Scans for the id of a given parameter in the c_QueryString. Returns the id for the parameter.
24
+ #
25
+ # Example
26
+ # => scan_id('edition') # will scan editionid number
27
+ def scan_id(param)
28
+ @query_string.match(/#{param}id=(\d+)/).captures.first
23
29
  end
24
30
  end
25
31
  end
@@ -1,3 +1,3 @@
1
1
  module Infostrada
2
- VERSION = '0.1.19'
2
+ VERSION = '0.1.20'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infostrada
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Otero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-06 00:00:00.000000000 Z
11
+ date: 2014-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler