nineteen-eighty-two 0.1.7 → 0.1.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f669ccaacae9bf19d9bca5f488c0a00198a317eb
|
4
|
+
data.tar.gz: c54e1809abc23ff2ce910ac765085f79c3c227f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7094bb6c5212755665766bd2557dbaef9e738a132366905ef263091372979f3d4a1010552d1dd57b75b122514fa229e53a310e400e574a18f67dad85c98a6fb
|
7
|
+
data.tar.gz: 6508015b4f35bd3757defe3277f273d292f549d00413ce839b1a044c9cd758c7c4b893786a1be3fbb0a45eaec250b60cc18f57a4f7c2046f691c258a20de1fde
|
@@ -10,7 +10,8 @@ module Nineteen
|
|
10
10
|
context = {
|
11
11
|
width: text.longest * 8,
|
12
12
|
height: text.count * 8,
|
13
|
-
fill_colour: options.fetch(:colour,
|
13
|
+
fill_colour: options.fetch(:colour, nil),
|
14
|
+
class: options.fetch(:class, nil),
|
14
15
|
body: body(text)
|
15
16
|
}
|
16
17
|
Erubis::Eruby.new(t).evaluate(context)
|
@@ -1,4 +1,5 @@
|
|
1
|
-
<svg viewBox='0 0 <%= @width %> <%= @height %>' xmlns='http://www.w3.org/2000/svg'>
|
1
|
+
<svg <% if @class %>class='<%= @class %>' <% end %>viewBox='0 0 <%= @width %> <%= @height %>' xmlns='http://www.w3.org/2000/svg'>
|
2
|
+
<% if @fill_colour %>
|
2
3
|
<style type='text/css'>
|
3
4
|
<![CDATA[
|
4
5
|
rect.on {
|
@@ -6,6 +7,7 @@
|
|
6
7
|
}
|
7
8
|
]]>
|
8
9
|
</style>
|
10
|
+
<% end %>
|
9
11
|
<g>
|
10
12
|
<%= @body.map { |b| " #{b}" }.join "\n" %>
|
11
13
|
</g>
|