Class: GeoPattern::ColorGenerators::SimpleGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/geo_pattern/color_generators/simple_generator.rb

Overview

Simple one

Instance Method Summary collapse

Constructor Details

#initialize(color, creator = Color) ⇒ SimpleGenerator

New

Parameters:

  • color (String)

    HTML color string, #0a0a0a


16
17
18
19
# File 'lib/geo_pattern/color_generators/simple_generator.rb', line 16

def initialize(color, creator = Color)
  @color = color
  @creator = creator
end

Instance Method Details

#generateObject

Generator color


22
23
24
# File 'lib/geo_pattern/color_generators/simple_generator.rb', line 22

def generate
  creator.new(color)
end