y-rb 0.2.0-x86_64-linux-musl → 0.3.1-x86_64-linux-musl
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/yrb/Cargo.toml +1 -1
- data/ext/yrb/src/awareness.rs +26 -41
- data/ext/yrb/src/lib.rs +87 -162
- data/ext/yrb/src/utils.rs +1 -3
- data/ext/yrb/src/yany.rs +1 -1
- data/ext/yrb/src/yarray.rs +24 -54
- data/ext/yrb/src/yawareness.rs +16 -48
- data/ext/yrb/src/ydoc.rs +2 -6
- data/ext/yrb/src/ymap.rs +18 -35
- data/ext/yrb/src/ytext.rs +29 -56
- data/ext/yrb/src/ytransaction.rs +2 -8
- data/ext/yrb/src/yvalue.rs +5 -11
- data/ext/yrb/src/yxml_element.rs +44 -65
- data/ext/yrb/src/yxml_text.rs +26 -47
- data/lib/2.7/yrb.so +0 -0
- data/lib/3.0/yrb.so +0 -0
- data/lib/3.1/yrb.so +0 -0
- data/lib/y/array.rb +2 -0
- data/lib/y/awareness.rb +139 -25
- data/lib/y/doc.rb +1 -1
- data/lib/y/map.rb +2 -0
- data/lib/y/text.rb +1 -1
- data/lib/y/version.rb +1 -1
- data/lib/y/xml.rb +5 -2
- data/lib/y-rb.rb +2 -0
- metadata +4 -4
data/lib/y/xml.rb
CHANGED
@@ -43,11 +43,13 @@ module Y
|
|
43
43
|
# @param [Integer] index
|
44
44
|
# @param [String] name Name of node, e.g. `<p />`
|
45
45
|
# @return [Y::XMLElement]
|
46
|
+
# rubocop:disable Lint/Void
|
46
47
|
def []=(index, name)
|
47
48
|
node = yxml_element_insert_element(transaction, index, name)
|
48
49
|
node.document = document
|
49
50
|
node
|
50
51
|
end
|
52
|
+
# rubocop:enable Lint/Void
|
51
53
|
|
52
54
|
# Returns first child in list or nil if no child exists
|
53
55
|
#
|
@@ -294,7 +296,7 @@ module Y
|
|
294
296
|
setter = method_name
|
295
297
|
setter += "=" unless is_setter
|
296
298
|
getter = method_name
|
297
|
-
getter = getter.to_s.slice(0...-1)
|
299
|
+
getter = getter.to_s.slice(0...-1)&.to_sym if is_setter
|
298
300
|
|
299
301
|
define_singleton_method(setter.to_sym) do |new_val|
|
300
302
|
yxml_element_insert_attribute(transaction,
|
@@ -352,7 +354,8 @@ module Y
|
|
352
354
|
# @return [String|nil]
|
353
355
|
|
354
356
|
# @!method yxml_element_insert_element(transaction, index, name)
|
355
|
-
#
|
357
|
+
# Insert XML element into this XML element
|
358
|
+
# @!visibility private
|
356
359
|
# @param [Y::Transaction] transaction
|
357
360
|
# @param [Integer] index
|
358
361
|
# @param [String] name
|
data/lib/y-rb.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: y-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: x86_64-linux-musl
|
6
6
|
authors:
|
7
7
|
- Hannes Moser
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.9.
|
33
|
+
version: 0.9.32
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.9.
|
40
|
+
version: 0.9.32
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake-compiler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|