builder_quill_content 0.1.0 → 0.1.1

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: c84caa5c19d8a033b0924e9f855c46d401344f61ef8e071ed60ecc92c212f87f
4
- data.tar.gz: 2244aa4b8b40aa8ddbbb4766f3baf0ef66941dc58dca0c7577e04d1acac67cd8
3
+ metadata.gz: c8ae5025ab31bcfa7a716431be579fb1ee7a279724c1d7ffab1a6a1775dd5b64
4
+ data.tar.gz: 214ebcbe24cfdc56e13ee64e78c6d30cf594acd63828cd05023c69569aa88c38
5
5
  SHA512:
6
- metadata.gz: 595f5d01b1440d1f43057ac3d76d23949bec5070209d416ce1e6419027f77f9501dddae6c675cd1b15455e75ced12bd423945bff4ed4a155010dc3f790ed50c6
7
- data.tar.gz: 94505802ac0fc3f34d11d255320155ad71a8797ce964b8d40f0c6f77fb4276c18e7c53a6f23144cb1fb773bb6bb0086ecccbab88afb7e5f040e994c6e0d13029
6
+ metadata.gz: 143de3efae9414d5d22f4b6b26415a925311300224dd8d2385b353ca7f689d71df912bccbde6a76a7fd4a90b3dc4f296d09e0ea200cc410c099f231eaeeebb74
7
+ data.tar.gz: 53c35b3645a27631ad7dfac1c742851be2529e04f539b829041e7b3d0ebbfe4ed00a6586b3396a08792d14bf787d3b9c138013e84a9af2e6d170c054529444d3
@@ -1,13 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module BuilderQuillContent
3
+ class BuilderQuillContent
4
+ attr_accessor :content
5
+
4
6
  VALID_INLINE_KEYS = %w[italic bold header blockquote link list].freeze
5
7
  VALID_MEDIA_KEYS = %w[wk-image wk-youtube wk-tweet wk-instagram wk-divider waku-post wk-maps].freeze
6
8
  START_VALID_HTML_TAGS = %w[<h2 <div <ul <hr <blockquote].freeze
7
9
  END_VALID_HTML_TAGS = %w[/h2> /div> /ul> hr> /blockquote>].freeze
8
10
 
9
- def to_html(content)
11
+ def initialize(content)
10
12
  @content = content
13
+ end
14
+
15
+ def to_html
11
16
  save_tag_p = result = ''
12
17
 
13
18
  convert_inline.each_with_index do |text, i|
@@ -1,3 +1,3 @@
1
1
  module BuilderQuillContent
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: builder_quill_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Tran
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-27 00:00:00.000000000 Z
11
+ date: 2020-02-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: