domle 0.1.10 → 0.1.11

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
  SHA1:
3
- metadata.gz: fc3d73aa9e2167b3266d6d0029a8c76b68bf41f7
4
- data.tar.gz: 7d2f1f2fea0ea48ef42dba5e2fec70c026dfe43c
3
+ metadata.gz: d574931630dadcbf946322bb4e25eb7a7c5fc232
4
+ data.tar.gz: 813a6d3022c98278c11971c3437382ae4693034b
5
5
  SHA512:
6
- metadata.gz: f184563d43ba7db470b56ff765065501cf8452af71e96394667f17f16f7a82ee5d1acc46923b39a3b28b5badb18cc66eb393bb09dad7b9421ecb45c1ec4962f6
7
- data.tar.gz: 7b65a4cc7243f6ff86d4e301bd97ee9122b5a8d54ee615990a747154260c2211f2c3e755b1dc1ba755a4e9be52ba5cd70a67bf54157a97d85eb9bede52af2e09
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: Attributes.new(parent: self), rexle: nil)
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.10
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-10 00:00:00.000000000 Z
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