anatomy 0.1.2 → 0.1.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
  SHA1:
3
- metadata.gz: 04adeb28321ab263b43c1eb67f43fece83e146a7
4
- data.tar.gz: b6d92742f86bf40e08127e2bbe83147fffb9f14d
3
+ metadata.gz: 20f0dec3c0eda4fbff6a6af803a5ebb10ce7c2f3
4
+ data.tar.gz: a49d167cf070f380d466bf047fa4f21d49c4a4d7
5
5
  SHA512:
6
- metadata.gz: d6ec0e90761749dd11544265cd31fe79a77b50da171423cc9e3b1701739023f4f2d6d9b60560d1085da1d1fccba9a555c2424eb4e961a0dc955d730bfedac268
7
- data.tar.gz: 00c982dcf41ee290f8443dfac29839492c907fce11d03ca6537ca787cef0f30f9117b4aee45a57bb059da9a258377dbe852a2c84c463f72132cb97c601e0a995
6
+ metadata.gz: f223c6fe311ff82971cd7481e9b2371c4a952fcc6b8575c9dd38f7e123ebbce9727fae99d48b2f456ba902b0cccdf2647b8d70c390935d83d20b6b2bcdeeb136
7
+ data.tar.gz: 928790cd88ec3937d3b75e7b10b368f7a6e558173626497ed90284b90b493df17705ac5575b5dfd06946ef35246b1a03c4ada2921a889f6960b6e8bc77e7e830
data/lib/anatomy/html.ay CHANGED
@@ -50,7 +50,17 @@ def(HTMLElement to-s):
50
50
  out << i"<#{@name}"
51
51
 
52
52
  @attributes each [k, v]:
53
- out << i" #{k}=\"#{v}\""
53
+ v match:
54
+ -- boolean attribute, enabled
55
+ true:
56
+ out << i" #{k}"
57
+
58
+ -- boolean attribute, disabled
59
+ false: ;
60
+
61
+ -- string attribute
62
+ _:
63
+ out << i" #{k}=\"#{v}\""
54
64
 
55
65
  unless(@body):
56
66
  out << " />"
@@ -115,6 +115,12 @@ def(over(e & data Element)):
115
115
  <object(data = file, type = "image/svg+xml", width = "100%", height = "100%"):
116
116
  <param(name = "src", value = file)
117
117
 
118
+ .script-src(url):
119
+ <script(src = url) {}
120
+
121
+ .async-script-src(url):
122
+ <script(async = true, defer = true, src = url) {}
123
+
118
124
  .aux:
119
125
  unless(^(in-reference?)):
120
126
  over(e content)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anatomy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Suraci
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-12 00:00:00.000000000 Z
11
+ date: 2015-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: atomy