cesd_problems 0.1.4.0 → 0.1.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e85a35eed5983042e86206dfa08b05b8b48ebee
4
- data.tar.gz: 7010c8f28173c1a2207bfae195d51be1527b0e3c
3
+ metadata.gz: 028ddf6e52faf9d246f809dde41345258fb00e05
4
+ data.tar.gz: da1f01de995b168ccb5cb3b9b9bb028f7d200893
5
5
  SHA512:
6
- metadata.gz: 2218d6ca1815c3d720527cd9356ebd8b6f7c9b5b44bc919e857258376670d346b550ddc8794606a57def7418b1103877fd543e6e15cba01e818d5eef4f3a61e5
7
- data.tar.gz: 76d7291fafab63319f229ac9d15c33a797d3f9dd3d8e7fecd9cf70b0afd23f5fec237be2bf06ef96a8a8a8996a96e4c4f90961b8cde0c077fffedd7bce389112
6
+ metadata.gz: 3135b71619b318c42642b9ed513deeea3472476cda39ca911e7ed27c6c7cf7cc0be2f108acbd4476b276e82deccc4dd0dfc713eeaadbaebe24fbedea624bb3d6
7
+ data.tar.gz: 59f8249f9cf66fb63a1dc0816a9d693ff0b4ebe42cc90eef39ce7d3ab91319cd6093b5b5986f1931c53f7725aa3c3fd3f888566ed18485dda2edcaee15363a7f
data/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  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/cesd_problems`. To experiment with that code, run `bin/console` for an interactive prompt.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ This gem provide ces-d problems and points.
6
+
7
+ Problems and points return by hash, you can choose problems and points, answers, criteria only.
6
8
 
7
9
  ## Installation
8
10
 
@@ -22,7 +24,17 @@ Or install it yourself as:
22
24
 
23
25
  ## Usage
24
26
 
25
- TODO: Write usage instructions here
27
+ ```ruby
28
+ require 'cesd_problems'
29
+
30
+ # get all.
31
+ ja_problems = CesdProblems.get_ja_problems
32
+ en_problems = CesdProblems.get_en_problems
33
+
34
+ # get problems and points only.
35
+ ja_problems_only = CesdProblems.get_ja_problems(CesdProblems::PROBLEMS)
36
+ en_problems_only = CesdProblems.get_en_problems(CesdProblems::PROBLEMS)
37
+ ```
26
38
 
27
39
  ## Development
28
40
 
@@ -32,7 +44,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
44
 
33
45
  ## Contributing
34
46
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cesd_problems. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
47
+ Bug reports and pull requests are welcome on GitHub at https://github.com/h-shigemoto/cesd_problems. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
48
 
37
49
 
38
50
  ## License
@@ -1,3 +1,3 @@
1
1
  module CesdProblems
2
- VERSION = "0.1.4.0"
2
+ VERSION = "0.1.4.1"
3
3
  end
data/lib/cesd_problems.rb CHANGED
@@ -4,13 +4,13 @@ require "cesd_problems/version"
4
4
  module CesdProblems
5
5
 
6
6
  # get all problems.
7
- GET_ALL = 0
7
+ ALL = 0
8
8
  # get answers only.
9
- GET_ANSWERS = 1
9
+ ANSWERS = 1
10
10
  # get problems only.
11
- GET_PROBLEMS = 2
11
+ PROBLEMS = 2
12
12
  # get criteria only.
13
- GET_CRITERIA = 3
13
+ CRITERIA = 3
14
14
 
15
15
  # get ces-d problems and points by hash(Japanese)
16
16
  # @param [integer] mode get mode.
@@ -94,13 +94,13 @@ module CesdProblems
94
94
  extract_problems = nil
95
95
 
96
96
  case mode
97
- when GET_ALL then
97
+ when ALL then
98
98
  extract_problems = problems
99
- when GET_ANSWERS then
99
+ when ANSWERS then
100
100
  extract_problems = { answers: problems[:answers] }
101
- when GET_PROBLEMS then
101
+ when PROBLEMS then
102
102
  extract_problems = { problems: problems[:problems] }
103
- when GET_CRITERIA then
103
+ when CRITERIA then
104
104
  extract_problems = { criteria: problems[:criteria] }
105
105
  else
106
106
  extract_problems = nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cesd_problems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.0
4
+ version: 0.1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - h.shigemoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-26 00:00:00.000000000 Z
11
+ date: 2016-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler