openstax_content 1.0.0 → 1.1.0

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
  SHA256:
3
- metadata.gz: 5ce0c0361f6d9e8205eb18893bb7d4f4bf726a2adf6fab3fe35649c56ae55876
4
- data.tar.gz: ccec97c10020878437487261de88a742ccf16480e178227a323420ed2f9fe4fd
3
+ metadata.gz: b5c44db02299099f4ac183c14f7f819c1e9a97718368e96d824098f52ac8c5b2
4
+ data.tar.gz: 77609137d353ea7cb987e196c83b9b0b037ad2a3540cc390cfa61defcf05ded0
5
5
  SHA512:
6
- metadata.gz: 419d040e582db3b9233e2a6ebfcc3a6ad5bf908ed656a74aa67ecab1f111ad9278947e9bae3dab41d0479f36c7ad8750cabdac760dd6ca8ba73acacc8b94841d
7
- data.tar.gz: aafb9064479bdaa157c557018b46c442f9c9abc4f0ce8fb48e12b7f81c8f0f09f2bba2829db6227bc7d5c36831b9909bb581839cea80da65cea87a5b807d33a9
6
+ metadata.gz: 55e497de225847314bce4a2a2b22a4956fd313b032bcce0a9e2ff72f9c405672c2ad6d8b1dd59273dd457f2be5a4fcdad76dd71fa7bb47dfbf80cf47fee133ff
7
+ data.tar.gz: 7bcb8889c471a1d8748385367cd33438ffdb069da7c7e68c12d0a8109b4c8ab0c81c20f9f68716f1d0f650a49aee53f954c00b502f6e2b30e8fe5eb72777be30
@@ -32,7 +32,7 @@ class OpenStax::Content::Page
32
32
  node.at_css(feature_id_css)
33
33
  end
34
34
 
35
- def initialize(book: nil, hash: {}, uuid: nil, url: nil, title: nil, content: nil)
35
+ def initialize(book: nil, hash: {}, uuid: nil, url: nil, title: nil, slug: nil, content: nil)
36
36
  @uuid = uuid || hash['id']&.split('@', 2)&.first
37
37
  raise ArgumentError, 'Either uuid or hash with id key is required' if @uuid.nil?
38
38
 
@@ -40,11 +40,12 @@ class OpenStax::Content::Page
40
40
  @hash = hash
41
41
  @url = url
42
42
  @title = title || hash['title']
43
+ @slug = slug || hash['slug']
43
44
  @content = content
44
45
  end
45
46
 
46
47
  attr_accessor :chapter_section
47
- attr_reader :uuid, :hash
48
+ attr_reader :uuid, :hash, :slug
48
49
 
49
50
  def book
50
51
  raise ArgumentError, 'Book was not specified' if @book.nil?
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Content
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dante Soares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-01 00:00:00.000000000 Z
11
+ date: 2022-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3