domle 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/domle.rb +8 -6
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d574931630dadcbf946322bb4e25eb7a7c5fc232
|
4
|
+
data.tar.gz: 813a6d3022c98278c11971c3437382ae4693034b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7862fbebe9301133fb093215c0c078eae5e46ab6f712b811cf6f5a2f34cfa9de856ef1ac6109b4ed4c975a9b75560ca522cac7b0e1d0645b1b19243da68b0a12
|
7
|
+
data.tar.gz: 713076e205bf123e32a1d3dbcebb39f364974e1eb66c59a9af204f9704ccd1c192f71f45e8d2df6c6d208770e9d47cadaf901ec52d2c61ca5d6e571c8ea22faf
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/domle.rb
CHANGED
@@ -19,17 +19,18 @@ class Style < Hash
|
|
19
19
|
|
20
20
|
super(k,v)
|
21
21
|
@parent[:style] = self.map{|x| x.join(':') }.join(';')
|
22
|
-
@parent.callback.refresh
|
22
|
+
@parent.callback.refresh if @parent.callback
|
23
23
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
class Attributes
|
27
|
+
class VisualAttributes < Attributes
|
28
28
|
|
29
29
|
attr_reader :callback
|
30
30
|
|
31
|
-
def initialize(parent: nil)
|
31
|
+
def initialize(x, parent: nil)
|
32
32
|
@callback = parent
|
33
|
+
self.merge! x if x
|
33
34
|
end
|
34
35
|
|
35
36
|
def style(parent=nil)
|
@@ -55,11 +56,12 @@ class Domle < Rexle
|
|
55
56
|
|
56
57
|
class Element < Rexle::Element
|
57
58
|
|
59
|
+
@default = {}
|
58
60
|
def initialize(name=self.class.to_s.downcase[/\w+$/], value: nil, \
|
59
|
-
attributes:
|
61
|
+
attributes: VisualAttributes.new(parent: self), rexle: nil)
|
60
62
|
|
61
63
|
attributes.merge!(style: '') unless attributes.has_key? :style
|
62
|
-
super(name, value: value, attributes: attributes, rexle: rexle)
|
64
|
+
super(name, value: value, attributes: VisualAttributes.new(attributes), rexle: rexle)
|
63
65
|
|
64
66
|
end
|
65
67
|
|
@@ -248,4 +250,4 @@ class Domle < Rexle
|
|
248
250
|
end
|
249
251
|
|
250
252
|
|
251
|
-
end
|
253
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: domle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
+DzRmU3W/HlxCxS+NNxtsXgbF7OVnKffoGck1XJLZRXir0GNIDPNB8lscxnltAgL
|
32
32
|
VUONgYmKlCGQ2w==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-08-
|
34
|
+
date: 2017-08-11 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|