npb 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/README.md +5 -8
- data/lib/npb/schedule.rb +6 -6
- data/lib/npb/version.rb +1 -1
- data/npb-0.1.3.gem +0 -0
- metadata +3 -3
- data/npb-0.1.2.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3388979a0b9bf6e1f3994ed2dce7c14fce522e67
|
|
4
|
+
data.tar.gz: 67e63c38968bc1f805ae36ea10578759546ec0e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3ccb0b6e93aaa3a54a82bc4947a40e648cf253935f54338835764d2251af1bd60d229bce3aabb08b76d5ea21de7cc2897c9ce3f09c6ca01bf7daab0e552e4f5
|
|
7
|
+
data.tar.gz: 506a6a7a30d12a095e68d723e33d0dd10cb21ff996a9a7b2152fae19e60fe23e29016d8687ba63c03d98a238a5058afa05ef312d70c8cc4cfa78fb3393ad5767
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Npb
|
|
2
2
|
|
|
3
|
+
[](https://travis-ci.org/to0526/npb_schedule)
|
|
4
|
+
|
|
3
5
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/npb`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
6
|
|
|
5
7
|
TODO: Delete this and the text above, and describe your gem
|
|
@@ -23,18 +25,13 @@ Or install it yourself as:
|
|
|
23
25
|
## Usage
|
|
24
26
|
|
|
25
27
|
```
|
|
26
|
-
|
|
27
|
-
pry(main)> schedules = Npb::Schedule.all
|
|
28
|
+
> schedules = Npb::Schedule.all
|
|
28
29
|
processing 2015-03-23
|
|
29
30
|
processing 2015-03-30
|
|
30
31
|
processing 2015-04-06
|
|
31
32
|
...
|
|
32
|
-
|
|
33
|
-
=> #<Npb::Schedule:
|
|
34
|
-
@home="巨人",
|
|
35
|
-
@start_at=2015-03-27 18:00:00 +0900,
|
|
36
|
-
@studium="東京ドーム",
|
|
37
|
-
@visitor="DeNA">
|
|
33
|
+
> schedules.first
|
|
34
|
+
=> #<Npb::Schedule:0x007fa61c523d88 @home="巨人", @visitor="DeNA", @home_score=3, @visitor_score=2, @stadium="東京ドーム", @start_at=2015-03-27 18:00:00 +0900>@visitor="DeNA">
|
|
38
35
|
```
|
|
39
36
|
|
|
40
37
|
## Development
|
data/lib/npb/schedule.rb
CHANGED
|
@@ -5,7 +5,7 @@ require 'active_support/core_ext'
|
|
|
5
5
|
|
|
6
6
|
module Npb
|
|
7
7
|
class Schedule
|
|
8
|
-
attr_accessor :
|
|
8
|
+
attr_accessor :home_team, :visitor_team, :home_score, :visitor_score, :stadium, :start_at
|
|
9
9
|
|
|
10
10
|
class << self
|
|
11
11
|
def all
|
|
@@ -17,8 +17,8 @@ module Npb
|
|
|
17
17
|
@time = source.css('td.pl7')[2].text.split[0]
|
|
18
18
|
@score = source.css('td.ct')[0].text
|
|
19
19
|
arr << new(
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
home_team: source.css('td.pl7')[0].text,
|
|
21
|
+
visitor_team: source.css('td.pl7')[1].text,
|
|
22
22
|
home_score: home_score,
|
|
23
23
|
visitor_score: visitor_score,
|
|
24
24
|
stadium: source.css('td.pl7')[2].text.split[1],
|
|
@@ -72,9 +72,9 @@ module Npb
|
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
|
|
75
|
-
def initialize(
|
|
76
|
-
@
|
|
77
|
-
@
|
|
75
|
+
def initialize(home_team: nil, visitor_team: nil, home_score: nil, visitor_score: nil, stadium: nil, start_at: nil)
|
|
76
|
+
@home_team = home_team
|
|
77
|
+
@visitor_team = visitor_team
|
|
78
78
|
@home_score = home_score
|
|
79
79
|
@visitor_score = visitor_score
|
|
80
80
|
@stadium = stadium
|
data/lib/npb/version.rb
CHANGED
data/npb-0.1.3.gem
ADDED
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: npb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ohtsuka
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-05-
|
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -83,7 +83,7 @@ files:
|
|
|
83
83
|
- lib/npb.rb
|
|
84
84
|
- lib/npb/schedule.rb
|
|
85
85
|
- lib/npb/version.rb
|
|
86
|
-
- npb-0.1.
|
|
86
|
+
- npb-0.1.3.gem
|
|
87
87
|
- npb.gemspec
|
|
88
88
|
homepage: https://github.com/to0526/npb_schedule
|
|
89
89
|
licenses: []
|
data/npb-0.1.2.gem
DELETED
|
Binary file
|