npr_best_books 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/npr_best_books/list.rb +10 -10
- data/lib/npr_best_books/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de88c2465ac4d7926b1d9b783f092f3b2d8f325f
|
4
|
+
data.tar.gz: 92e4554755600d77908d58f412f51e3720c26168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b2229946be0b564339e9abe7d8b79ce2d7210822264260d02a858f41bb3a5094910f8687f7882e52ae66a8c6a3cddaa0685800dc846376b6146b65095e0b05a
|
7
|
+
data.tar.gz: edc99e500969b0c658edef1a5b3bdccb729b2bada6197e3d589ac35da1049a7e617100931eae415f870da7be78cec2ca880505a34de623ffda2ac2d225eea361
|
data/lib/npr_best_books/list.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class NPRBestBooks::List
|
2
2
|
|
3
|
-
attr_accessor :year, :name, :books, :list
|
3
|
+
attr_accessor :year, :name, :books, :list, :list_sff
|
4
4
|
|
5
5
|
@@list_years = [ 2015 ]
|
6
6
|
|
@@ -33,24 +33,24 @@ class NPRBestBooks::List
|
|
33
33
|
|
34
34
|
def self.science_fiction_and_fantasy
|
35
35
|
# @list1 assigned to science_fiction_and_fantasy
|
36
|
-
if @
|
37
|
-
@
|
36
|
+
if @list_sff
|
37
|
+
@list_sff.books.each do |book|
|
38
38
|
puts "#{book.id}. #{book.title} by #{book.author}"
|
39
39
|
end
|
40
|
-
@
|
40
|
+
@list_sff.books
|
41
41
|
else
|
42
|
-
@
|
43
|
-
@
|
44
|
-
@
|
45
|
-
@
|
42
|
+
@list_sff = self.new
|
43
|
+
@list_sff.year = @@list_years.last
|
44
|
+
@list_sff.name = "Science Fiction and Fantasy"
|
45
|
+
@list_sff.books = NPRBestBooks::Book.science_fiction_and_fantasy
|
46
46
|
book_id = 1
|
47
|
-
@
|
47
|
+
@list_sff.books.each do |book|
|
48
48
|
book.id = book_id
|
49
49
|
book.amazonurl = NPRBestBooks::Book.lookup_amazonurl(book)
|
50
50
|
puts "#{book.id}. #{book.title} by #{book.author}"
|
51
51
|
book_id += 1
|
52
52
|
end
|
53
|
-
@
|
53
|
+
@list_sff.books
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: npr_best_books
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- beingy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|