Module: Rewords::SiteKit
- Defined in:
- lib/rewords/site_kit.rb
Constant Summary collapse
- BASE_URL =
"https://rewordsai.app"
Class Method Summary collapse
- .edit_text_in_image_url ⇒ Object
- .home_url ⇒ Object
- .photo_text_editor_url ⇒ Object
- .remove_text_from_image_url ⇒ Object
- .replace_text_in_image_url ⇒ Object
- .tool_url(slug = "") ⇒ Object
- .tools_url ⇒ Object
- .translate_text_in_image_url ⇒ Object
Class Method Details
.edit_text_in_image_url ⇒ Object
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_url ⇒ Object
7 8 9 |
# File 'lib/rewords/site_kit.rb', line 7 def home_url BASE_URL end |
.photo_text_editor_url ⇒ Object
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_url ⇒ Object
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_url ⇒ Object
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_url ⇒ Object
16 17 18 |
# File 'lib/rewords/site_kit.rb', line 16 def tools_url tool_url("tools") end |
.translate_text_in_image_url ⇒ Object
36 37 38 |
# File 'lib/rewords/site_kit.rb', line 36 def translate_text_in_image_url tool_url("translate-text-in-image") end |