lib/initial_avatar/configuration.rb in initial_avatar-0.1.0 vs lib/initial_avatar/configuration.rb in initial_avatar-0.1.1
- old
+ new
@@ -1,14 +1,15 @@
module InitialAvatar
class Configuration
- OPTIONS = %i[text_color size font_weight font_family].freeze
+ OPTIONS = %i[text_color size font_weight font_family seed].freeze
attr_accessor :colors
attr_accessor :text_color
attr_accessor :size
attr_accessor :font_weight
attr_accessor :font_family
+ attr_accessor :seed
def initialize
@colors = %w[
#1abc9c #16a085 #f1c40f #f39c12 #2ecc71 #27ae60 #e67e22 #d35400 #3498db
#2980b9 #e74c3c #c0392b #9b59b6 #8e44ad #bdc3c7 #34495e #2c3e50 #95a5a6
@@ -16,9 +17,10 @@
]
@text_color = '#ffffff'
@size = 100
@font_weight = 400
@font_family = 'HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica, Arial,Lucida Grande, sans-serif'
+ @seed = 0
end
def default_options
OPTIONS.map { |key| [key, public_send(key)] }.to_h
end