jsmenubuilder 0.3.2 → 0.3.3

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: 20f9e46658d2144a31d83fdbf9b48a73579db567461ea6c86611450413f28c25
4
- data.tar.gz: 901f1040f84f8d34895f2c65db42d47c79a382d4e58149de059cd70a5dfbf68c
3
+ metadata.gz: a10a162af08191487c9a9a319138a98e8fcdcf140c1515a420735b4183ff23d8
4
+ data.tar.gz: 4686b4ea0d93b8da54e5bdd5b0dc28aa7fdadede1e31680f86d56d06eccd08a2
5
5
  SHA512:
6
- metadata.gz: d5fc2f02cc51cd201b74778d5b9654ded0eca88fd721ea333d48ea0db230ac80b2833a75a22602931fb496aa78b9fea8d5dfa1a3fa65a9c92ff1711c9dfe2927
7
- data.tar.gz: bb6a937c8c676f5f10d9b7e97b084f7f6041166a6292f43b0c5efa1111415c28dd77b63b3e021cdfb6bb3d81083c07e1dd029b41fcaa0985a8a152b2e2b0b506
6
+ metadata.gz: b4e7901de3a313b463cff4561455dd52c90e729508c49b63bc28ee0eb13787969fddc635963166359f2b2bd4585c7d937c599937f4d89ff3f595ad48d593bd76
7
+ data.tar.gz: a9b502b47aa422a89865c6ee0847063fd60fc00c5091f0bb8ff37326cedfc834ff6ef432d88d51e72af7903ed6f9b64749a78b91fb6335245a3fa6105e950d2c
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -423,7 +423,7 @@ EOF
423
423
  puts 'inside build_h'.info if @debug
424
424
 
425
425
  h = doc.root.xpath('tag').inject({}) do |r,e|
426
- r.merge(e.attributes[:title] => e.children.join.strip)
426
+ r.merge(e.attributes[:title] => [e.children.join.strip, e.attributes[:class].join(' ')])
427
427
  end
428
428
 
429
429
  puts ('build_h: ' + h.inspect).debug if @debug
@@ -455,8 +455,9 @@ EOF
455
455
 
456
456
  a = RexleBuilder.build do |xml|
457
457
  xml.tags({mode: type}) do
458
- entries.each do |heading, content|
459
- xml.tag({title: heading}, content )
458
+ entries.each do |heading, value|
459
+ content, klass = value
460
+ xml.tag({title: heading, class: klass}, content )
460
461
  end
461
462
  end
462
463
  end
@@ -573,12 +574,19 @@ EOF
573
574
 
574
575
  xml.h2({class: 'anchor', id: char.downcase}, char)
575
576
 
576
- rows.each do |heading, inner_html|
577
+ rows.each do |heading, value|
578
+
579
+ puts 'value: ' + value.inspect if @debug
580
+ inner_html, attrclass = value
581
+
577
582
  puts 'inner_html: ' + inner_html.inspect if debug
578
583
  xml.a({class: 'anchor', name: heading.downcase.gsub(/\W/,'-')\
579
584
  .gsub(/-{2,}/,'-').gsub(/^-|-$/,'')})
580
585
  xml.button({class:'accordion'}, heading.to_s)
581
- xml.div({class:'panel'}, inner_html)
586
+
587
+ s = 'panel'
588
+ s += ' ' + attrclass if attrclass
589
+ xml.div({class: s}, inner_html)
582
590
 
583
591
  end
584
592
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsmenubuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  haYJPATx3zs+9jtQoiFg+keM0CPYk/5LgCv9jxxzQcSS20C8O9MWRVvYfIr47ak7
36
36
  yXrDPmRvbJLTNjDv6Tkg3vU6
37
37
  -----END CERTIFICATE-----
38
- date: 2020-02-25 00:00:00.000000000 Z
38
+ date: 2020-04-20 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rexle
metadata.gz.sig CHANGED
Binary file