honeybii 2.0.3 → 2.0.4

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/honeybii/shaded_ascii.rb +4 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d0947089595e853e9f872274272e230790f9c4d
4
- data.tar.gz: 67617adb4259f2382c8da9c0c60d4972e78b3dfe
3
+ metadata.gz: 0908c625e5e8bc3a10830f72f388442120c709e3
4
+ data.tar.gz: 16d83aa1188a55e58c5125d9d819ee6b9a9b962e
5
5
  SHA512:
6
- metadata.gz: 19e25da9de48e7dc00383ea9385e3b8c67c9da82da09107c0d52ce839206620f889806feb841d1186de5c9aedea5bc8a00db4bd3633623f668234ac430cbc58e
7
- data.tar.gz: 713ab498b2eb6e94f3f6c4211c67728559161e43dd72cbb89c78bd922c03e4812d0ab3435dcff57b2c1c4ed5b43be3ab496467cb7e0aeed9ed85ec30ffc0e48f
6
+ metadata.gz: 576188c8a3c4669bdd52df25f8fb25f8e91b94efe2a9e1043ad1b4e884bb3783ccb4df74dd12cb77951dab27096310ea2bc418e3a561ead131019cee391c51bc
7
+ data.tar.gz: b0b53b4d134ff0fe23fa82d6634a94c3554b8eab574e8de0d079041ff9571d59bf848f4fdc07bb092c9e239455cc5e2b17bc11492b060ae8019d72e69944d999
@@ -1,6 +1,7 @@
1
1
  class ShadedAscii < AsciiImage
2
2
  class << self
3
3
  attr_accessor :gradients
4
+ attr_accessor :styles
4
5
  end
5
6
 
6
7
  @gradients = [
@@ -9,9 +10,11 @@ class ShadedAscii < AsciiImage
9
10
  ['#', '+', ':', ' ', ' '],
10
11
  ['0', '1', ' ', ' '],
11
12
  ]
13
+ @styles = [ 'relative', 'one_to_one' ]
12
14
 
13
- def initialize(image_filename, point_size = 12, gradient: 0, style: 'one_to_one')
15
+ def initialize(image_filename, point_size = 12, gradient: 0, style: 'relative')
14
16
  super image_filename, point_size
17
+ raise ArgumentError, "style must be one of the following: #{ShadedAscii.styles}" unless ShadedAscii.styles.include? style
15
18
  @gradient = ShadedAscii.gradients[gradient]
16
19
  @style = style
17
20
  to_ascii!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybii
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamey DeOrio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-12 00:00:00.000000000 Z
11
+ date: 2014-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rmagick