Module: AvatarGenerator

Defined in:
lib/avatar_generator.rb,
lib/avatar_generator/image.rb,
lib/avatar_generator/avatar.rb,
lib/avatar_generator/version.rb,
lib/avatar_generator/renderer.rb,
lib/avatar_generator/generator.rb,
lib/avatar_generator/configuration.rb,
lib/generators/avatar_generator/install/install_generator.rb

Defined Under Namespace

Modules: Generators Classes: Avatar, Configuration, Error, Generator, Image, Renderer

Constant Summary collapse

VERSION =
"0.1.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject (readonly)

Returns the value of attribute configuration.



20
21
22
# File 'lib/avatar_generator.rb', line 20

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



22
23
24
# File 'lib/avatar_generator.rb', line 22

def configure
  yield(configuration)
end

.generate(identifier, **options) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/avatar_generator.rb', line 26

def generate(identifier, **options)
  image =
    Generator
    .new(identifier, **options)
    .call

  Avatar.new(
    image,
    identifier: identifier
  )
end