bible_parser 1.1.0 → 1.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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32bd13b35cbb3041347d60987896ac2f2686c6793f850e675edff1cd08f76b73
|
|
4
|
+
data.tar.gz: b67396dff174fe8a0a0c8e1f6cb4f1caf46094ab1fa2b51e8167cafdf1b5b7f1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 025d34cb5576169c0a5e86f43db0feb7db276597e895a923af709265c1cba66a4c52ff71a0875abf891375ffb8eb888aa0a75ab12a9fbf519877f32237eaf19d
|
|
7
|
+
data.tar.gz: 3ae8a2a336fe5652eb98000da8d3d3b55d9cf782393934565011ff4283764c7ad549a34dca76321403e401ef47321b792191bf3af101b3038378d5ebb1c89590
|
|
@@ -11,6 +11,8 @@ class BibleParser
|
|
|
11
11
|
when 'div'
|
|
12
12
|
end_verse if @mode == 'verse'
|
|
13
13
|
start_book(attributes)
|
|
14
|
+
when 'milestone'
|
|
15
|
+
set_book_title_from_milestone(attributes)
|
|
14
16
|
when 'title'
|
|
15
17
|
set_book_title(attributes)
|
|
16
18
|
when 'chapter'
|
|
@@ -43,11 +45,17 @@ class BibleParser
|
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
def set_book_title(attributes)
|
|
48
|
+
return if @book_title
|
|
46
49
|
attributes = Hash[attributes]
|
|
47
50
|
return unless attributes['type'] == 'main'
|
|
48
51
|
@book_title = attributes['short']
|
|
49
52
|
end
|
|
50
53
|
|
|
54
|
+
def set_book_title_from_milestone(attributes)
|
|
55
|
+
attributes = Hash[attributes]
|
|
56
|
+
@book_title = attributes['n']
|
|
57
|
+
end
|
|
58
|
+
|
|
51
59
|
def end_book_title
|
|
52
60
|
@mode = nil
|
|
53
61
|
end
|