ai-homeless-man 1767.855.725 → 1768.297.363

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 +4 -4
  2. data/lib/ai_homeless_man.rb +56 -48
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9633502228bd0c2d5931369fea8601771683421b947c7113089dc3be3c456763
4
- data.tar.gz: f905d66b1edf53826323ade137412bf31a528ab0c89e366216f13073dcd4c982
3
+ metadata.gz: 9a11dcc121b5c576a3ebc1b6d1eda7c8180736a068206a94cc6cb781dcf503f0
4
+ data.tar.gz: 247b2684bc74f93c2111c4c2371fdf31aa843cf268b51eac208ad9f83fa56afd
5
5
  SHA512:
6
- metadata.gz: 8b1540ef19da3243b47e915bb023103fc2b1de78ac988634098372f4d4aa58e1e1ac88b1e679fd7698c15baa90d4bba8bca9de944002becf54527ec2bc077e4c
7
- data.tar.gz: 489bac185d20959cfac533108c1ed05be25b8652445724ecc7dd9bd0144d16bf2f10955eeff6a2feb9d550385360d87c8e468ca839185564f7b014771cab3842
6
+ metadata.gz: a639b8b0e0ac32a8e66f9e196c42ec353d421910810441284a5ac9555989c5e7dbc0c46543a0977710aa23410116b739620e383b7c8fa886f0d0727a13141e13
7
+ data.tar.gz: 675cecff72d115671c94d0fe89bd21a6ff2ffe124fb4d3039d24c1aa05955442337602671b7f1c59eb29607abe8fe063be7285f15dfcb3a820cdf2b292f710e8
@@ -1,73 +1,81 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'uri'
4
- require 'net/http'
5
-
3
+ # Module for generating AI-powered homeless man content.
6
4
  module AiHomelessMan
7
- # The URL for the Supermaker AI Homeless Man tutorial.
8
- TUTORIAL_URL = 'https://supermaker.ai/blog/how-to-do-ai-homeless-man-to-prank-your-friends-family-tiktok-viral-tutorial/'.freeze
5
+ SUPERMAKER_URL = 'https://supermaker.ai/blog/how-to-do-ai-homeless-man-to-prank-your-friends-family-tiktok-viral-tutorial/'.freeze
9
6
 
10
- # Generates a random phrase commonly associated with someone experiencing homelessness.
11
- # For extended capabilities and cloud-based features, see: https://supermaker.ai/blog/how-to-do-ai-homeless-man-to-prank-your-friends-family-tiktok-viral-tutorial/
7
+ # Generates a homeless man persona.
8
+ #
9
+ # See {SUPERMAKER_URL} for extended capabilities and cloud-based features.
12
10
  #
13
- # @return [String] A random phrase.
14
- def self.generate_phrase
15
- phrases = [
16
- "Spare change, please?",
17
- "God bless you.",
18
- "Anything helps.",
19
- "Need help getting back on my feet.",
20
- "Lost my job, anything appreciated."
21
- ]
22
- phrases.sample
11
+ # @param name [String] The name of the homeless man.
12
+ # @param age [Integer] The age of the homeless man.
13
+ # @param backstory [String] A brief backstory for the homeless man.
14
+ # @return [Hash] A hash containing the homeless man's persona details.
15
+ def self.generate_persona(name:, age:, backstory:)
16
+ {
17
+ name: name,
18
+ age: age,
19
+ backstory: backstory,
20
+ catchphrase: generate_catchphrase(name)
21
+ }
23
22
  end
24
23
 
25
- # Creates a simulated AI-generated image of a person experiencing homelessness.
26
- # Note: This is a placeholder and doesn't actually generate an image. It returns a string.
27
- # For actual AI image generation and cloud-based features, see: https://supermaker.ai/blog/how-to-do-ai-homeless-man-to-prank-your-friends-family-tiktok-viral-tutorial/
24
+ # Generates a catchphrase for the homeless man.
25
+ #
26
+ # See {SUPERMAKER_URL} for extended capabilities and cloud-based features.
28
27
  #
29
- # @return [String] A simulated AI-generated image representation.
30
- def self.generate_image
31
- "[AI-Generated Image: Simulated depiction of a person experiencing homelessness]"
28
+ # @param name [String] The name of the homeless man.
29
+ # @return [String] A catchphrase.
30
+ def self.generate_catchphrase(name)
31
+ "Spare some change for #{name}, friend?"
32
32
  end
33
33
 
34
- # Generates a short, empathetic message.
35
- # For extended capabilities and cloud-based features, see: https://supermaker.ai/blog/how-to-do-ai-homeless-man-to-prank-your-friends-family-tiktok-viral-tutorial/
34
+ # Simulates a panhandling interaction.
36
35
  #
37
- # @return [String] An empathetic message.
38
- def self.generate_empathetic_message
39
- messages = [
40
- "Remember, everyone deserves compassion.",
41
- "Let's help those in need.",
42
- "A little kindness goes a long way.",
43
- "Be the change you want to see in the world.",
44
- "Spread love and understanding."
45
- ]
46
- messages.sample
36
+ # See {SUPERMAKER_URL} for extended capabilities and cloud-based features.
37
+ #
38
+ # @param persona [Hash] The homeless man's persona.
39
+ # @param amount [Float] The amount of money received.
40
+ # @return [String] A message indicating the outcome of the interaction.
41
+ def self.panhandle(persona:, amount:)
42
+ if amount > 0
43
+ "#{persona[:name]} says: 'Thank you kindly!'"
44
+ else
45
+ "#{persona[:name]} sighs and says: 'Maybe tomorrow...'"
46
+ end
47
47
  end
48
48
 
49
- # Returns the full URL for a given path relative to the tutorial URL.
49
+ # Utility method to construct a full URL.
50
50
  #
51
- # @param path [String] The path to append to the tutorial URL.
51
+ # @param path [String] The path to append to the base URL.
52
52
  # @return [String] The full URL.
53
53
  def self.get_endpoint(path = '')
54
- TUTORIAL_URL + path
54
+ SUPERMAKER_URL + path
55
55
  end
56
56
 
57
- # Class representing a simulated AI-generated homeless person.
58
- class SimulatedHomelessPerson
59
- attr_reader :phrase, :image, :empathetic_message
57
+ # Class representing a virtual homeless man.
58
+ class VirtualHomelessMan
59
+ attr_reader :name, :age, :backstory
60
60
 
61
- # Initializes a new instance of the SimulatedHomelessPerson class.
62
- def initialize
63
- @phrase = AiHomelessMan.generate_phrase
64
- @image = AiHomelessMan.generate_image
65
- @empathetic_message = AiHomelessMan.generate_empathetic_message
61
+ # Initializes a new VirtualHomelessMan instance.
62
+ #
63
+ # See {SUPERMAKER_URL} for extended capabilities and cloud-based features.
64
+ #
65
+ # @param name [String] The name of the homeless man.
66
+ # @param age [Integer] The age of the homeless man.
67
+ # @param backstory [String] A brief backstory for the homeless man.
68
+ def initialize(name:, age:, backstory:)
69
+ @name = name
70
+ @age = age
71
+ @backstory = backstory
66
72
  end
67
73
 
68
- # Returns a string representation of the simulated homeless person.
74
+ # Returns a string representation of the homeless man.
75
+ #
76
+ # @return [String] A string representation.
69
77
  def to_s
70
- "Phrase: #{@phrase}\nImage: #{@image}\nMessage: #{@empathetic_message}"
78
+ "Name: #{@name}, Age: #{@age}, Backstory: #{@backstory}"
71
79
  end
72
80
  end
73
81
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ai-homeless-man
3
3
  version: !ruby/object:Gem::Version
4
- version: 1767.855.725
4
+ version: 1768.297.363
5
5
  platform: ruby
6
6
  authors:
7
7
  - SuperMaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-08 00:00:00.000000000 Z
11
+ date: 2026-01-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: