Module: Rewords::SiteKit

Defined in:
lib/rewords/site_kit.rb

Constant Summary collapse

BASE_URL =
"https://rewordsai.app"

Class Method Summary collapse

Class Method Details

.edit_text_in_image_urlObject



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

def edit_text_in_image_url
  tool_url("edit-text-in-image")
end

.home_urlObject



7
8
9
# File 'lib/rewords/site_kit.rb', line 7

def home_url
  BASE_URL
end

.photo_text_editor_urlObject



32
33
34
# File 'lib/rewords/site_kit.rb', line 32

def photo_text_editor_url
  tool_url("photo-text-editor")
end

.remove_text_from_image_urlObject



28
29
30
# File 'lib/rewords/site_kit.rb', line 28

def remove_text_from_image_url
  tool_url("remove-text-from-image")
end

.replace_text_in_image_urlObject



24
25
26
# File 'lib/rewords/site_kit.rb', line 24

def replace_text_in_image_url
  tool_url("replace-text-in-image")
end

.tool_url(slug = "") ⇒ Object



11
12
13
14
# File 'lib/rewords/site_kit.rb', line 11

def tool_url(slug = "")
  clean = slug.to_s.gsub(%r{\A/+|/+\z}, "")
  clean.empty? ? BASE_URL : "#{BASE_URL}/#{clean}"
end

.tools_urlObject



16
17
18
# File 'lib/rewords/site_kit.rb', line 16

def tools_url
  tool_url("tools")
end

.translate_text_in_image_urlObject



36
37
38
# File 'lib/rewords/site_kit.rb', line 36

def translate_text_in_image_url
  tool_url("translate-text-in-image")
end