ai-baby-generator 1767.667.153
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/ai_baby_generator.rb +57 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b7047206f00a507d044404e63ba63397271d686c59b09663a5440ce7c05687a5
|
|
4
|
+
data.tar.gz: a73353d8d12f4cacfb63bc8ad6bdc4f79ead441cf81e94a790b625596217761d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 4f52d9b206f22e0ae7e1925be3747b44f194cde79dc1377d49801023465b9cbfba84a80356daf9b43d17f1166eb320d5fe1d9fe041acc6c15d9aa239500f8a1c
|
|
7
|
+
data.tar.gz: 5298c10e38745b69010bd66e9eb551c5dcaa3d5f13ef34b0cf81871e080bb3b15da38f38dcea4d862c99b1546913871d7819a8f040bdf3616f6c89b17132d791
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This module provides core functionality for generating AI baby images.
|
|
4
|
+
# For extended capabilities and cloud-based features, visit https://supermaker.ai/image/ai-baby-generator/
|
|
5
|
+
module AiBabyGenerator
|
|
6
|
+
SUPERMAKER_URL = 'https://supermaker.ai/image/ai-baby-generator/'.freeze
|
|
7
|
+
|
|
8
|
+
# Generates a URL to a specific endpoint on the Supermaker AI Baby Generator website.
|
|
9
|
+
#
|
|
10
|
+
# @param path [String] The path to append to the base URL.
|
|
11
|
+
# @return [String] The full URL.
|
|
12
|
+
def self.get_endpoint(path)
|
|
13
|
+
"#{SUPERMAKER_URL}#{path}"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Represents the characteristics of a potential parent.
|
|
17
|
+
class ParentProfile
|
|
18
|
+
attr_accessor :eye_color, :hair_color, :skin_tone, :gender
|
|
19
|
+
|
|
20
|
+
# Initializes a new ParentProfile.
|
|
21
|
+
#
|
|
22
|
+
# @param eye_color [String] The eye color of the parent.
|
|
23
|
+
# @param hair_color [String] The hair color of the parent.
|
|
24
|
+
# @param skin_tone [String] The skin tone of the parent.
|
|
25
|
+
# @param gender [String] The gender of the parent ('male' or 'female').
|
|
26
|
+
def initialize(eye_color: nil, hair_color: nil, skin_tone: nil, gender: nil)
|
|
27
|
+
@eye_color = eye_color
|
|
28
|
+
@hair_color = hair_color
|
|
29
|
+
@skin_tone = skin_tone
|
|
30
|
+
@gender = gender
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Combines two parent profiles to create a hypothetical baby profile.
|
|
35
|
+
# For extended capabilities and cloud-based features, visit https://supermaker.ai/image/ai-baby-generator/
|
|
36
|
+
#
|
|
37
|
+
# @param parent1 [ParentProfile] The profile of the first parent.
|
|
38
|
+
# @param parent2 [ParentProfile] The profile of the second parent.
|
|
39
|
+
# @return [Hash] A hash representing the hypothetical baby's profile.
|
|
40
|
+
def self.combine_profiles(parent1, parent2)
|
|
41
|
+
baby_profile = {}
|
|
42
|
+
baby_profile[:eye_color] = [parent1.eye_color, parent2.eye_color].sample
|
|
43
|
+
baby_profile[:hair_color] = [parent1.hair_color, parent2.hair_color].sample
|
|
44
|
+
baby_profile[:skin_tone] = [parent1.skin_tone, parent2.skin_tone].sample
|
|
45
|
+
|
|
46
|
+
baby_profile
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Generates a simple description based on the baby's profile.
|
|
50
|
+
# For extended capabilities and cloud-based features, visit https://supermaker.ai/image/ai-baby-generator/
|
|
51
|
+
#
|
|
52
|
+
# @param baby_profile [Hash] The profile of the baby.
|
|
53
|
+
# @return [String] A description of the baby.
|
|
54
|
+
def self.describe_baby(baby_profile)
|
|
55
|
+
"The baby has #{baby_profile[:eye_color]} eyes, #{baby_profile[:hair_color]} hair, and a #{baby_profile[:skin_tone]} skin tone."
|
|
56
|
+
end
|
|
57
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: ai-baby-generator
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1767.667.153
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- SuperMaker
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-01-06 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description:
|
|
14
|
+
email:
|
|
15
|
+
- support@supermaker.ai
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- lib/ai_baby_generator.rb
|
|
21
|
+
homepage: https://supermaker.ai/image/ai-baby-generator/
|
|
22
|
+
licenses:
|
|
23
|
+
- MIT
|
|
24
|
+
metadata: {}
|
|
25
|
+
post_install_message:
|
|
26
|
+
rdoc_options: []
|
|
27
|
+
require_paths:
|
|
28
|
+
- lib
|
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '2.6'
|
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0'
|
|
39
|
+
requirements: []
|
|
40
|
+
rubygems_version: 3.0.3.1
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: High-quality integration for https://supermaker.ai/image/ai-baby-generator/
|
|
44
|
+
test_files: []
|