htmlcom 0.3.1 → 0.3.2

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: c5c56bbfd02df1b1aa0af4dd6408b34301964015bcefed1a8a6a88b89c98d42d
4
- data.tar.gz: 6dee7c3818848ce0428cfb5b3df0a2c7cf79b5b4139d22fde8389212dd6e7694
3
+ metadata.gz: '004926ea699b4ce9c1012d1d5e632888096b5e684bae156ddd0cfb35f276d17e'
4
+ data.tar.gz: b99f506d3b6d56a2bbaaedafd5065d4ba685d3b7a5aeb670511bbad1cd1d32c9
5
5
  SHA512:
6
- metadata.gz: 31bdddd64984e4a344436918bb09e1a79acc0bb58d15a6878f8a0c28afa30da1b3486c7d68bf3464b4288faec8a7c55351f5f6bc33037dd7186bf0deb8be4c92
7
- data.tar.gz: 46dfd28e68b5f40cabfbde02c854b2bfefaf1fbca2b7455945822b5b9635ea0f8ff45bb538130ecc987ae6e80137ab87b4b7f7c3d2dec4910fe37946a0e314ee
6
+ metadata.gz: 86cafbf4a63453b607c544f2d1622546d50090579992ff3f3d28095a2add8dd46ee6945dafbebea9116d34c8f0d38b84b358f91814934f7a7cad0626c999d6f8
7
+ data.tar.gz: 965c93adbf6de988a47a0335934a83ba0ec9a9ba718dad192bceacb78d9718deb283edb7e968c9a779b083ba974822a4dc7cf5174f152441a0dd08a3a6012f36
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/htmlcom.rb CHANGED
@@ -354,6 +354,10 @@ EOF
354
354
  @doc
355
355
  end
356
356
 
357
+ def to_html()
358
+ html_element.xml pretty: true
359
+ end
360
+
357
361
  def build(rawobj)
358
362
  obj = rawobj.is_a?(Hash) ? RexleBuilder.new(rawobj).to_a : rawobj
359
363
  Rexle.new(obj)
@@ -443,6 +447,11 @@ EOF
443
447
 
444
448
  end
445
449
 
450
+ def add_submit()
451
+ submit = Rexle.new(['input', {type: 'submit', value: 'Submit'}])
452
+ html_element().add submit
453
+ end
454
+
446
455
  end
447
456
 
448
457
 
@@ -454,8 +463,6 @@ EOF
454
463
 
455
464
  class FormBuilder
456
465
 
457
-
458
-
459
466
  def initialize(inputs: {}, options: {}, id: 'form1', method: :get, action: '', debug: false)
460
467
 
461
468
  @debug = debug
@@ -496,6 +503,9 @@ EOF
496
503
  end
497
504
 
498
505
  end
506
+
507
+ @form.add_submit
508
+
499
509
  end
500
510
 
501
511
  def to_doc()
@@ -503,7 +513,7 @@ EOF
503
513
  end
504
514
 
505
515
  def to_html()
506
- @form.to_doc.root.xml pretty: true
516
+ @form.to_html
507
517
  end
508
518
 
509
519
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: htmlcom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -36,7 +36,7 @@ cert_chain:
36
36
  JNdZs/7/k4vQlgqYQ3HnoA6GgIanmCgNkediqllxv/epLyIkW2DSJGcYXM8QjSEk
37
37
  +4RQ8UHDCOWHpFPlT5Pgc0wPc7KyXosRYHg=
38
38
  -----END CERTIFICATE-----
39
- date: 2022-07-06 00:00:00.000000000 Z
39
+ date: 2022-07-07 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jsmenubuilder
metadata.gz.sig CHANGED
Binary file