npb_api 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/npb_api/game.rb +4 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 153dbf022428d138453906f8fdba81a879fd0b7c
4
- data.tar.gz: b709d2d14d30dc6f022ee352260fb2b32f7f44e6
3
+ metadata.gz: cf9e43043f017072e235b938e5f85c577c412f22
4
+ data.tar.gz: 469e2ec5ee2fa289c778f129bf1ff64f7bf06031
5
5
  SHA512:
6
- metadata.gz: 00deef3e8de598b138f772685c88fef94bfe93f3293d25b4f304d8c3382e46c143f1f59f9cb2efebc1851b8d61334b351a1521b60dcd61727ba1ca543d4238a5
7
- data.tar.gz: 5b0169a3478fa3132ccdbdb2fb30596fcf0656f5c703edc881051aaa7d8eef1d8f5bfe8a23422c58c602438944b5c229b04cbc5bb1fbdb6a7b088506aa8ee55d
6
+ metadata.gz: e32d5e115ac1bcc0b53886334428a2319bd1c718af341251eaa8fad6767b620eb925093a5577b38d382668a3bfea0b7b935e320c508adf53894dc5a27716f203
7
+ data.tar.gz: 61087efa4b6666c607e282fb2af64678183d7f8bc919b54b9e0de0d0d63759632a84cb6b6b5fba1e6e7b63f9a9543e83deb463b5672d06f63dcf939563967b9b
data/lib/npb_api/game.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  class NpbApi::Game
2
2
  def initialize(date: '', id: '')
3
3
  @date = date
4
- @game_id = date.year.to_s + format('%02d', date.month) + format('%02d', date.day) + id
5
- @doc = Nokogiri::HTML(open("http://baseball.yahoo.co.jp/npb/game/#{@game_id}/top"))
4
+ @id = date.year.to_s + format('%02d', date.month) + format('%02d', date.day) + id
5
+ @doc = Nokogiri::HTML(open("http://baseball.yahoo.co.jp/npb/game/#{@id}/top"))
6
6
  end
7
7
 
8
8
  def away
9
9
  {
10
- game_id: @game_id,
10
+ id: @id,
11
11
  status: status,
12
12
  team: @doc.css('.column-right.clearfix i').text,
13
13
  score: away_score,
@@ -19,7 +19,7 @@ class NpbApi::Game
19
19
 
20
20
  def home
21
21
  {
22
- game_id: @game_id,
22
+ id: @id,
23
23
  status: status,
24
24
  team: @doc.css('.column-left.clearfix i').text,
25
25
  score: home_score,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: npb_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ohtsuka Takahiro