html-native 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 +4 -4
- data/lib/html-native/logic.rb +16 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0f5b72fda7cb3ea69d2faeeb693995f9637d130c4fe420eaf2af485241ba1e3
|
4
|
+
data.tar.gz: c4cf23530a4dee5e13044668701ee4f8cd66f60a37bf80e357a74fb5fc107570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8049b8dc8c076e6ea8b0850faa4fa1aa3bd2801e6a41c100fbbfef4c6410cd2a4717df2dd16c8f7e47d21d68452ae4c1db756b3b36786fed1f832f82b947b26d
|
7
|
+
data.tar.gz: bdc4844740e7fb6c3f491da49731a1bd2adfee5158a9ddaeb12988a2468070eac22358e3d866e61f377be7eaef1eb1e3e10bf58b952addef0f999a6dc9bb9cd3
|
data/lib/html-native/logic.rb
CHANGED
@@ -16,6 +16,22 @@ module HTMLComponent
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
19
|
+
|
20
|
+
def _if(bool, &block)
|
21
|
+
if bool
|
22
|
+
Builder.new(block.call)
|
23
|
+
else
|
24
|
+
Builder.new
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def _unless(bool, &block)
|
29
|
+
unless bool
|
30
|
+
Builder.new(block.call)
|
31
|
+
else
|
32
|
+
Builder.new
|
33
|
+
end
|
34
|
+
end
|
19
35
|
end
|
20
36
|
|
21
37
|
class String
|