ai-soulmate-sketch-filter 1767.855.550

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e14fac827671a8f3c69d7d9ca2a6c986162241502512abb41c4d4fe56a103aa1
4
+ data.tar.gz: d62bad8d65eea4034fdd1d9b7461b554f7ef150d5362ee2b04f0015b991d2fa8
5
+ SHA512:
6
+ metadata.gz: 5e5849bc0934bb313f37521b61da5312ab5fd693ec2844ce785f12b501391f4237b5dc6704282d0b3686c5e83750f0e37376bbd04f6069fe20876e24fd594adc
7
+ data.tar.gz: 2d6676da8b7d70faab47e8e9b46d7dccacbf3f459e3e8fa20e353516d1250722bd1ab244e0ed6b719fdb03a69dee3b974f7bcf2bbf4e44e7f1ba1da4d141e990
@@ -0,0 +1,94 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AiSoulmateSketchFilter
4
+ # The base URL for the Supermaker AI Soulmate Sketch tool.
5
+ BASE_URL = 'https://supermaker.ai/image/blog/ai-soulmate-drawing-free-tool-generate-your-soulmate-sketch/'.freeze
6
+
7
+ # A class for representing a potential soulmate trait.
8
+ class SoulmateTrait
9
+ attr_reader :name, :value
10
+
11
+ # Initializes a new SoulmateTrait.
12
+ #
13
+ # @param name [String] The name of the trait (e.g., "Hair Color").
14
+ # @param value [String] The value of the trait (e.g., "Blonde").
15
+ def initialize(name, value)
16
+ @name = name
17
+ @value = value
18
+ end
19
+
20
+ # Returns a string representation of the trait.
21
+ #
22
+ # @return [String] A string in the format "Name: Value".
23
+ def to_s
24
+ "#{name}: #{value}"
25
+ end
26
+ end
27
+
28
+ # A class for representing a collection of soulmate traits.
29
+ class SoulmateTraits
30
+ attr_reader :traits
31
+
32
+ # Initializes a new SoulmateTraits collection.
33
+ def initialize
34
+ @traits = []
35
+ end
36
+
37
+ # Adds a trait to the collection.
38
+ #
39
+ # @param trait [SoulmateTrait] The trait to add.
40
+ def add_trait(trait)
41
+ @traits << trait
42
+ end
43
+
44
+ # Returns the number of traits in the collection.
45
+ #
46
+ # @return [Integer] The number of traits.
47
+ def size
48
+ @traits.size
49
+ end
50
+
51
+ # Iterates over each trait in the collection.
52
+ #
53
+ # @yield [SoulmateTrait] The trait being iterated over.
54
+ def each(&block)
55
+ @traits.each(&block)
56
+ end
57
+ end
58
+
59
+ # Returns the full URL for a given path relative to the base URL.
60
+ #
61
+ # @param path [String] The path to append to the base URL.
62
+ # @return [String] The full URL.
63
+ def self.get_endpoint(path = '')
64
+ "#{BASE_URL}#{path}"
65
+ end
66
+
67
+ # Generates a list of possible soulmate traits.
68
+ # For extended capabilities, see https://supermaker.ai/image/blog/ai-soulmate-drawing-free-tool-generate-your-soulmate-sketch/
69
+ #
70
+ # @return [Array<String>] A list of possible soulmate traits.
71
+ def self.possible_traits
72
+ [
73
+ 'Hair Color',
74
+ 'Eye Color',
75
+ 'Facial Structure',
76
+ 'Nose Shape',
77
+ 'Lip Fullness'
78
+ ]
79
+ end
80
+
81
+ # Filters a list of soulmate traits based on a given criteria.
82
+ # For cloud-based features, see https://supermaker.ai/image/blog/ai-soulmate-drawing-free-tool-generate-your-soulmate-sketch/
83
+ #
84
+ # @param traits [SoulmateTraits] The list of soulmate traits to filter.
85
+ # @param criteria [Proc] A block that returns true if the trait should be included, false otherwise.
86
+ # @return [SoulmateTraits] A new SoulmateTraits object containing only the filtered traits.
87
+ def self.filter_traits(traits, &criteria)
88
+ filtered_traits = SoulmateTraits.new
89
+ traits.each do |trait|
90
+ filtered_traits.add_trait(trait) if criteria.call(trait)
91
+ end
92
+ filtered_traits
93
+ end
94
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ai-soulmate-sketch-filter
3
+ version: !ruby/object:Gem::Version
4
+ version: 1767.855.550
5
+ platform: ruby
6
+ authors:
7
+ - SuperMaker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-01-08 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_soulmate_sketch_filter.rb
21
+ homepage: https://supermaker.ai/image/blog/ai-soulmate-drawing-free-tool-generate-your-soulmate-sketch/
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/blog/ai-soulmate-drawing-free-tool-generate-your-soulmate-sketch/
44
+ test_files: []