scriptura 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8fa54c0a40b8f2ca71660cd315a198bd6bf542d
4
- data.tar.gz: 31f304950cf6afd0b4aea0f82b9dac80ac69a770
3
+ metadata.gz: 7497510bea044fcf42b442213fb40b3692a1914b
4
+ data.tar.gz: 4b28b4bd4d209c15aa93310efc9f15ba51eec2c5
5
5
  SHA512:
6
- metadata.gz: 21de014750a34966d7b7cd6dbe9e955cfa1c310fd6dbf371234ce0f9b38f533a0f77531115dd0d4d95a5620f777edc9080cdad675b6dd14cebdbdc97495561ab
7
- data.tar.gz: e3cb32e45b06ad12726690cdcc835d868f4a3504c0c65f773a5375765e8213248472b86a9de45e2fac6224a938ecac33fb1057a857fa9b6e5d73bee70e790f4e
6
+ metadata.gz: 54ee690d2fd4958e86a9758c5a8510fb006c43dc7d864ddfb6132355ac50f9d34d1433a6884c4fc75f17532233a6682d7f6304ae6169eba018d89ad31d79f29a
7
+ data.tar.gz: 435a9dbf040369f581ed9d0f7d56e6097a4069024ec1cc46d30f906e019bb4d8fcdcd31f229e7f3cdd9fbf284c9e0d53c9362d090ac2c93f4056cd496508ed8f
@@ -1,4 +1,5 @@
1
1
  require 'scriptura/scripture'
2
+ require 'scriptura/testament'
2
3
 
3
4
  module Scriptura
4
5
  class ScriptureBook
@@ -51,6 +52,15 @@ module Scriptura
51
52
  last_chapter.number
52
53
  end
53
54
 
55
+
56
+ def testament
57
+ @testament = if number < 40
58
+ Scriptura::Testament.new('Old')
59
+ else
60
+ Scriptura::Testament.new('New')
61
+ end
62
+ end
63
+
54
64
  def to_hash
55
65
  book_hash
56
66
  end
@@ -0,0 +1,16 @@
1
+ module Scriptura
2
+ class Testament
3
+ DATA = %w(Old New)
4
+
5
+ attr_reader :name
6
+
7
+ def initialize(name)
8
+ fail ArgumentError unless DATA.include?(name)
9
+ @name = name.capitalize
10
+ end
11
+
12
+ def string_id
13
+ name.downcase
14
+ end
15
+ end
16
+ end
@@ -1,5 +1,5 @@
1
1
  module Scriptura
2
2
  module Version
3
- STRING = '0.0.5'
3
+ STRING = '0.0.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scriptura
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gagan Awhad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-28 00:00:00.000000000 Z
11
+ date: 2016-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: safe_yaml
@@ -83,6 +83,7 @@ files:
83
83
  - lib/scriptura/scripture_chapter.rb
84
84
  - lib/scriptura/scripture_reference.rb
85
85
  - lib/scriptura/scripture_verse.rb
86
+ - lib/scriptura/testament.rb
86
87
  - lib/scriptura/version.rb
87
88
  homepage: https://www.github.com/gaganawhad/scriptura
88
89
  licenses: []
@@ -103,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
104
  version: '0'
104
105
  requirements: []
105
106
  rubyforge_project:
106
- rubygems_version: 2.4.8
107
+ rubygems_version: 2.4.6
107
108
  signing_key:
108
109
  specification_version: 4
109
110
  summary: A ruby library that attempts to provide an intuitive API for operations on