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: b1384a47de3860d571be0288ea9332d98b845ce1
4
- data.tar.gz: 4e905b2f09a4861b5c6846eba01afacf46bac0b0
3
+ metadata.gz: f669ccaacae9bf19d9bca5f488c0a00198a317eb
4
+ data.tar.gz: c54e1809abc23ff2ce910ac765085f79c3c227f8
5
5
  SHA512:
6
- metadata.gz: 43f553565a5e04a49cb893f49761525a47b6e012cb083fa93fedecc7d6fad35b000e9134cbdf5a4222ff6526b8e94237bf1acbb01d1ab8bce6eb2d3ffb4320fd
7
- data.tar.gz: 0f6a9defcf79c788cc15f2fa42fad159a0f5725eb3e3df385e74d366a0f77e9bca0c58c6251f514c17a8007d1a481f5ef880b32173d1a9a3a07fa7681105f5fa
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, '#000000'),
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>
@@ -1,7 +1,7 @@
1
1
  module Nineteen
2
2
  module Eighty
3
3
  module Two
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.8"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nineteen-eighty-two
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - pikesley