open_bd 0.1.0 → 0.1.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: 7b5522ee17be5d02e156f1074281a77db9c5e3c0
4
- data.tar.gz: d00ca27118a9dcd4744cf1e1ac016386ce2e6e25
3
+ metadata.gz: 568e64b7433254518a824b5c6f534f590f247a7e
4
+ data.tar.gz: 82f1b64a62d30c5d3315b898d48be48bab819c04
5
5
  SHA512:
6
- metadata.gz: 1ad0f929c7b186d7d1f89b996924fc3b07d0ff2b6ff67e70097f3c6cde49430bd22de7c0fc860867a215f6be9bdca511820a05c84dd6311de4ada43d65ed7395
7
- data.tar.gz: e0fa21c3551921c56c13aa2d76d4937cb95e0d0839698bf207c22e0c0afde79c5e71152c13d33a27f20e48a5752e9e10a8810581742031f3c463700dffb060b0
6
+ metadata.gz: f923bd638c13219a44bf73c9aa9de052abc4eb86d9efab7406e64f3baa5f84bc6a9e2fcd62bc43b47e56725d490925a1e9e44af63ff4d3a3032a78bcb6533acd
7
+ data.tar.gz: 5af5cab38bb2411aebd96458eb765d9b1703d835ab94f6b5104ae430f4f30e2064aaf940a6844ba0f6a5e10cf52c2e9f39629d2995ce8c941fdbc108c062e2ac
data/README.md CHANGED
@@ -25,7 +25,7 @@ Or install it yourself as:
25
25
  ## Usage
26
26
 
27
27
  ```
28
- client = OpenBD.new
28
+ client = OpenBD::Client.new
29
29
  # Pass the value of isbn to isbns
30
30
  res = client.search(isbns: [])
31
31
 
@@ -1,19 +1,19 @@
1
1
  module OpenBD
2
- class Content
2
+ class Contents
3
3
  attr_reader :source
4
4
 
5
5
  def initialize(source)
6
6
  @source = source
7
7
  end
8
8
 
9
- def content
9
+ def contents
10
10
  value = source.find { |x| x["TextType"] == "02" }
11
11
  if !value.nil?
12
12
  value["Text"]
13
13
  end
14
14
  end
15
15
 
16
- def content_detail
16
+ def contents_detail
17
17
  value = source.find { |x| x["TextType"] == "03" }
18
18
  if !value.nil?
19
19
  value["Text"]
@@ -6,15 +6,15 @@ module OpenBD
6
6
  @source = source
7
7
  end
8
8
 
9
- def content
10
- if !content_source.nil?
11
- Content.new(content_source).content
9
+ def contents
10
+ if !contents_source.nil?
11
+ Contents.new(contents_source).contents
12
12
  end
13
13
  end
14
14
 
15
- def content_detail
16
- if !content_source.nil?
17
- Content.new(content_source).content_detail
15
+ def contents_detail
16
+ if !contents_source.nil?
17
+ Contents.new(contents_source).contents_detail
18
18
  end
19
19
  end
20
20
 
@@ -62,8 +62,8 @@ module OpenBD
62
62
  end
63
63
 
64
64
  def table_of_contents
65
- if !content_source.nil?
66
- Content.new(content_source).table_of_contents
65
+ if !contents_source.nil?
66
+ Contents.new(contents_source).table_of_contents
67
67
  end
68
68
  end
69
69
 
@@ -77,7 +77,7 @@ module OpenBD
77
77
 
78
78
  private
79
79
 
80
- def content_source
80
+ def contents_source
81
81
  source.dig("onix", "CollateralDetail", "TextContent")
82
82
  end
83
83
  end
@@ -1,3 +1,3 @@
1
1
  module OpenBD
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/open_bd.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require "open_bd/version"
2
2
  require "open_bd/client"
3
- require "open_bd/content"
3
+ require "open_bd/contents"
4
4
  require "open_bd/contributor"
5
5
  require "open_bd/paper"
6
6
  require "open_bd/resource"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_bd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryosuke-endo
@@ -98,7 +98,7 @@ files:
98
98
  - bin/setup
99
99
  - lib/open_bd.rb
100
100
  - lib/open_bd/client.rb
101
- - lib/open_bd/content.rb
101
+ - lib/open_bd/contents.rb
102
102
  - lib/open_bd/contributor.rb
103
103
  - lib/open_bd/paper.rb
104
104
  - lib/open_bd/resource.rb