lcclasses 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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +20 -3
- data/lcclasses.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeb1be10398c6a7df915eabef2cdf1c5c7890bb22c4c2965b43c59579798a2d5
|
4
|
+
data.tar.gz: 7d735aa81881f9c168adabd80ff755109ea71407bb23a071771a1d9f9ea0df38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6baebb79f8ae80af160ddc4fa9c7f712f5f44033721b4fd6e15e3044baf48aac285aba7ba80f627c97e80763ef9ef8ee3a5644f0acb46ba7be89b35cf4709e2d
|
7
|
+
data.tar.gz: 42c3ed50be9477705a09a5e06d8cb290cf62c43321ad50fe1394e3fdc188f0313b8cdc115d0bc8ba1245faf42f0651a7c3d968f05cd9bc7917df8a260a0f0429
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,26 @@
|
|
1
1
|
# LCCLasses
|
2
2
|
|
3
|
-
A Ruby gem that provides the
|
3
|
+
A Ruby gem that provides the
|
4
|
+
[Library of Congress Classification](https://www.loc.gov/catdir/cpso/lcc.html)
|
5
|
+
system main classes and subclasses along with some convenience methods.
|
4
6
|
|
5
|
-
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
LCCLasses is available on [RubyGems](https://rubygems.org/gems/lcclasses):
|
6
10
|
|
7
11
|
```bash
|
8
12
|
gem install lcclasses
|
9
13
|
```
|
10
14
|
|
15
|
+
To install with [Bundler](https://bundler.io/), add the following to your
|
16
|
+
Gemfile:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
gem 'lcclasses'
|
20
|
+
```
|
21
|
+
|
22
|
+
Then run `bundle install`
|
23
|
+
|
11
24
|
## Usage
|
12
25
|
|
13
26
|
To find a classification code:
|
@@ -48,7 +61,11 @@ The `CLASS_HASH` constant is in the following format (truncated example):
|
|
48
61
|
}
|
49
62
|
```
|
50
63
|
|
51
|
-
Classes are returned as specialized LCClasses::Class arrays in the format
|
64
|
+
Classes are returned as specialized LCClasses::Class arrays in the format
|
65
|
+
`[code, name]`. In the case of nested LCClasses:LCClass objects, they are in
|
66
|
+
the format
|
67
|
+
`[main_class_code, main_class_name, [[subclass_code, subclass_name]]]`.
|
68
|
+
These objects are normal arrays with the following methods added:
|
52
69
|
|
53
70
|
```ruby
|
54
71
|
@class = LCClasses.find_main_class_by_code("M")
|
data/lcclasses.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'lcclasses'
|
5
|
-
s.version = '0.2.
|
5
|
+
s.version = '0.2.1'
|
6
6
|
s.licenses = ['MIT']
|
7
7
|
s.summary = 'Library of Congress Classification classes and subclasses.'
|
8
8
|
s.description = 'Library of Congress Classification classes and subclasses.'
|