live 0.14.0 → 0.15.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: 63034baadcba271590245009b106e82bc142734cbc4978d7a47c264a8368d92c
4
- data.tar.gz: ddb382c9499a3560ece8341a61e6d78076b2b2544fbb7ff3de1371e315e321bd
3
+ metadata.gz: 35d2a64d31fa83855d4dd194f497ef9c948c9d03fde7fabf73256bdccec8d03e
4
+ data.tar.gz: 161456e3ee4ded05ff1c6e58e81d78a098ed28a19d33d9da4217f2d4bc190db1
5
5
  SHA512:
6
- metadata.gz: c8c7edabe0b494d83b0260e803cf39899eb4a2bd91a8eba9e714ccf255f23cd7bb76ee19df9811bc255f316cc113c67fa9814b0152fcd0d05382e3c5e8f93877
7
- data.tar.gz: d4e8a3bfebf1bd77374cba4bac80d428b218834c2f0acb773268093aeb14ea14f3131194533c7a8aa0094431d20ee224f584d4babe6c27d9e7852119223cb578
6
+ metadata.gz: ba9b1e779713e8330e440d1d3f3fbb67b4ef41708e0d549828790d135f4e7e80e4420292e923dad5941be0e9ff538c6184383600773490fd6ee36ec8e796228c
7
+ data.tar.gz: f1f9df657949d4c56d5b99ccb2a280e4f9599d45152a1a96db3ca039401593d48df0fbe5e510d749f98e719b768fdd5fa9211bd58a25fa0c48e40b23fd137954
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/live/element.rb CHANGED
@@ -138,11 +138,17 @@ module Live
138
138
  builder.text(self.class.name)
139
139
  end
140
140
 
141
+ def append_markup(output)
142
+ build_markup(::XRB::Builder.new(output))
143
+ end
144
+
145
+ def build_markup(builder)
146
+ render(builder)
147
+ end
148
+
141
149
  # @returns [Object] The generated HTML.
142
150
  def to_html
143
- XRB::Builder.fragment do |builder|
144
- render(builder)
145
- end
151
+ XRB::Builder.fragment(&self.method(:build_markup))
146
152
  end
147
153
 
148
154
  # Convenience method for rendering the view as a string.
data/lib/live/version.rb CHANGED
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
6
  module Live
7
- VERSION = "0.14.0"
7
+ VERSION = "0.15.0"
8
8
  end
data/lib/live/view.rb CHANGED
@@ -10,11 +10,9 @@ module Live
10
10
  # Represents a single division of content on the page an provides helpers for rendering the content.
11
11
  class View < Element
12
12
  # @returns [Object] The generated HTML.
13
- def to_html
14
- XRB::Builder.fragment do |builder|
15
- builder.inline_tag :div, id: @id, class: "live", data: @data do
16
- render(builder)
17
- end
13
+ def build_markup(builder)
14
+ builder.inline_tag :div, id: @id, class: "live", data: @data do
15
+ render(builder)
18
16
  end
19
17
  end
20
18
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: live
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -39,7 +39,7 @@ cert_chain:
39
39
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
40
40
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
41
41
  -----END CERTIFICATE-----
42
- date: 2024-09-25 00:00:00.000000000 Z
42
+ date: 2024-10-28 00:00:00.000000000 Z
43
43
  dependencies:
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: async-websocket
@@ -73,16 +73,16 @@ dependencies:
73
73
  name: xrb
74
74
  requirement: !ruby/object:Gem::Requirement
75
75
  requirements:
76
- - - ">="
76
+ - - "~>"
77
77
  - !ruby/object:Gem::Version
78
- version: '0'
78
+ version: '0.10'
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - ">="
83
+ - - "~>"
84
84
  - !ruby/object:Gem::Version
85
- version: '0'
85
+ version: '0.10'
86
86
  description:
87
87
  email:
88
88
  executables: []
metadata.gz.sig CHANGED
Binary file