Module: UrlShortner

Defined in:
lib/url_shortner.rb,
lib/url_shortner/version.rb

Defined Under Namespace

Classes: Error, Generator

Constant Summary collapse

VERSION =
"0.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.base_urlObject

Returns the value of attribute base_url.



9
10
11
# File 'lib/url_shortner.rb', line 9

def base_url
  @base_url
end

.unique_key_lengthObject

Returns the value of attribute unique_key_length.



9
10
11
# File 'lib/url_shortner.rb', line 9

def unique_key_length
  @unique_key_length
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (UrlShortner)

    the object that the method was called on



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

def self.configure
  yield self if block_given?
end

Instance Method Details

#unique_key_lengthObject



12
13
14
# File 'lib/url_shortner.rb', line 12

def unique_key_length
  @unique_key_length || 6
end