class UrlShortener::Shortener

Overview

This object will create a shortened URL using a provided provider. If no provider is given, it will use a default one instead.

Defined in:

url-shortener.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(url : String) #

[View source]

Class Method Detail

def self.from_url(url) #

[View source]

Instance Method Detail

def provider #

[View source]
def provider=(provider : TinyUrlProvider | NoOpProvider) #

[View source]
def shorten #

Creates a shortened URL, using the provider and original url already supplied.


[View source]
def with_provider(provider) #

Lets you supply a provider (optional)


[View source]