BOBrb 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ffe777992daced1102dbe4563326c03c86730c8
4
- data.tar.gz: 320ad765ab0f3158e1b12292a68c1ca4598ee02b
3
+ metadata.gz: 3894a856f5b6caf56fca7d2823a931a1b0a765ae
4
+ data.tar.gz: 73c46f4bf69181366356a638d5811537b6ca8d4b
5
5
  SHA512:
6
- metadata.gz: c14f88296db65b641cd15c2ade161723682e11dda9e3b76d2e8309b5834c365166aea3a8e63b3f55aab8a4206d395c07e67f971cec633db70116fe2d9456a28c
7
- data.tar.gz: a75c813bdfd48cd67c5f7a64f122567fc360e1454ae6b97ac3174b239558c6fae004837f2d85bc35064c9ad55b2e5e2814a24206fb10c712cea59f9cf1e2ff65
6
+ metadata.gz: 00cdc749e1bcab0e06d85997221ffc4c8737d98c3f955637a7c909442568972d0d2ffcc414506e7d7b42f98db90a9b90cabfad2a626125658f596ac248c0b092
7
+ data.tar.gz: 247265ed719fd3bd5af7af3d785e1a99434eb54c999d2ea1143ad592073e4f01f69814f253f5e112544746338beb17efb131f3d60edef49f4205af5c8525375c
@@ -3,7 +3,7 @@ require "BOBrb/element"
3
3
  require "BOBrb/child_array"
4
4
 
5
5
  module BOBrb
6
- # Your code goes here...
6
+ @@mode = :html
7
7
  def self.new(*args)
8
8
  BOBrb::Element.new(*args)
9
9
  end
@@ -14,4 +14,12 @@ module BOBrb
14
14
  def self.d(*args)
15
15
  BOBrb::Element.method(:d)
16
16
  end
17
+ def self.set_mode(mode=:html)
18
+ #supported: :html and :xml
19
+ #Will affect how the resulting output is formatted
20
+ @@mode = mode
21
+ end
22
+ def self.get_mode
23
+ @@mode
24
+ end
17
25
  end
@@ -190,7 +190,7 @@ module BOBrb
190
190
  printself << 'style="' + @object_style.to_s() + '" ' if @object_style
191
191
 
192
192
  printself = printself[0..-2]
193
- closable = (["area",
193
+ closable = BOBrb.get_mode == :xml || (["area",
194
194
  "base",
195
195
  "br",
196
196
  "col",
@@ -1,3 +1,3 @@
1
1
  module BOBrb
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: BOBrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephan Nordnes Eriksen