Class: UrlShortner::Generator
- Inherits:
-
Object
- Object
- UrlShortner::Generator
- Defined in:
- lib/url_shortner/generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.generate ⇒ Object
2 3 4 |
# File 'lib/url_shortner/generator.rb', line 2 def self.generate new.generate end |
Instance Method Details
#generate ⇒ Object
6 7 8 9 |
# File 'lib/url_shortner/generator.rb', line 6 def generate short_code = generateShortCode(UrlShortner.unique_key_length) UrlShortner.base_url + short_code end |