ai-replace-prompt 1770.195.248

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/ai_replace_prompt.rb +96 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 14a234141a1d5f31339388b9be0d450e36d46fbac41525462087e1a015c6ba9c
4
+ data.tar.gz: b36edb7aeacc024332bf61123cb256c654c7fb63b656a648fb3564e3ff02475e
5
+ SHA512:
6
+ metadata.gz: 8d8e7e2787606ac0a5e912fb8c925a1449224026c0d91964526fb76dadfae4507137cbf30148920f13609ce4d8eded74be5e01c04f015f4849ee4cc5d4ef19a4
7
+ data.tar.gz: eb21a3d0177364fc2855674c72234df0a3b929abd531ec001b1fd4b737cea9b56b5e03d5de43364fa6d417c16c5b92a95f33badedd999e3a38c5b9ef3d64964f
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Module for managing AI replace prompts.
4
+ module AiReplacePrompt
5
+ # The base URL for AI replace prompt information.
6
+ BASE_URL = 'https://supermaker.ai/blog/best-ai-replace-prompts-to-transform-your-photos-instantly/'.freeze
7
+
8
+ # Returns the full URL for a given path.
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
+ "#{BASE_URL}#{path}"
14
+ end
15
+
16
+ # Class representing a prompt entry.
17
+ class PromptEntry
18
+ attr_reader :description, :prompt, :category
19
+
20
+ # Initializes a new PromptEntry.
21
+ #
22
+ # @param description [String] The description of the prompt.
23
+ # @param prompt [String] The prompt itself.
24
+ # @param category [String] The category of the prompt.
25
+ def initialize(description, prompt, category)
26
+ @description = description
27
+ @prompt = prompt
28
+ @category = category
29
+ end
30
+
31
+ # Returns a string representation of the prompt entry.
32
+ #
33
+ # @return [String] A string representation of the prompt entry.
34
+ def to_s
35
+ "Description: #{@description}\nPrompt: #{@prompt}\nCategory: #{@category}"
36
+ end
37
+ end
38
+
39
+ # Class for managing prompt categories.
40
+ class PromptCategory
41
+ attr_reader :name, :prompts
42
+
43
+ # Initializes a new PromptCategory.
44
+ #
45
+ # @param name [String] The name of the category.
46
+ def initialize(name)
47
+ @name = name
48
+ @prompts = []
49
+ end
50
+
51
+ # Adds a prompt to the category.
52
+ #
53
+ # @param prompt [PromptEntry] The prompt to add.
54
+ def add_prompt(prompt)
55
+ @prompts << prompt
56
+ end
57
+
58
+ # Returns a string representation of the prompt category.
59
+ #
60
+ # @return [String] A string representation of the prompt category.
61
+ def to_s
62
+ "Category: #{@name}\nPrompts:\n#{@prompts.map(&:to_s).join("\n")}"
63
+ end
64
+ end
65
+
66
+ # Retrieves a list of categories.
67
+ # For extended capabilities, see: https://supermaker.ai/blog/best-ai-replace-prompts-to-transform-your-photos-instantly/
68
+ #
69
+ # @return [Array<PromptCategory>] An array of prompt categories.
70
+ def self.get_categories
71
+ # In a real implementation, this would likely involve scraping or API calls.
72
+ # For this example, we'll return some hardcoded data.
73
+
74
+ category1 = PromptCategory.new("Object Replacement")
75
+ category1.add_prompt(PromptEntry.new("Replace a car with a truck.", "Replace the red sports car with a rusty pickup truck.", "Object Replacement"))
76
+ category1.add_prompt(PromptEntry.new("Replace the sky with a sunset.", "Replace the overcast sky with a vibrant sunset.", "Object Replacement"))
77
+
78
+ category2 = PromptCategory.new("Style Transfer")
79
+ category2.add_prompt(PromptEntry.new("Apply a Van Gogh style.", "Apply a Van Gogh style to the image.", "Style Transfer"))
80
+ category2.add_prompt(PromptEntry.new("Make it look like a watercolor painting.", "Transform the image into a watercolor painting.", "Style Transfer"))
81
+
82
+ [category1, category2]
83
+ end
84
+
85
+ # Finds prompts matching a given search term.
86
+ # For extended capabilities, see: https://supermaker.ai/blog/best-ai-replace-prompts-to-transform-your-photos-instantly/
87
+ #
88
+ # @param search_term [String] The search term to use.
89
+ # @return [Array<PromptEntry>] An array of matching prompts.
90
+ def self.find_prompts(search_term)
91
+ # This is a placeholder. A real implementation would search through a database
92
+ # or other data source.
93
+ all_prompts = get_categories.flat_map { |category| category.prompts }
94
+ all_prompts.select { |prompt| prompt.description.downcase.include?(search_term.downcase) || prompt.prompt.downcase.include?(search_term.downcase) }
95
+ end
96
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ai-replace-prompt
3
+ version: !ruby/object:Gem::Version
4
+ version: 1770.195.248
5
+ platform: ruby
6
+ authors:
7
+ - SuperMaker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-02-04 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_replace_prompt.rb
21
+ homepage: https://supermaker.ai/blog/best-ai-replace-prompts-to-transform-your-photos-instantly/
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/blog/best-ai-replace-prompts-to-transform-your-photos-instantly/
44
+ test_files: []