Module: Expander

Defined in:
lib/uncoil/expander.rb

Class Method Summary collapse

Class Method Details

.expand(short_url, bitly_instance = nil) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/uncoil/expander.rb', line 7

def expand(short_url, bitly_instance = nil)
  case 
  when domain_for(short_url) == :bitly && bitly_instance
    BitlyExpander.expand(short_url, bitly_instance)
  when domain_for(short_url) == :isgd
    IsgdExpander.expand(short_url)
  else
    DefaultExpander.expand(short_url)
  end
end