Class: UrlExpander::Expanders::Googl

Inherits:
API
  • Object
show all
Defined in:
lib/url_expander/expanders/api/googl.rb

Overview

Expand Google URLS Usage: UrlExpander::Client.expand(“goo.gl/DRppM”)

Defined Under Namespace

Classes: Request

Constant Summary collapse

PATTERN =

NOTICE: We ignored the / before the key goo.gl/DRppM => ‘DRppM’ without /

%r'(http://goo\.gl/([\w/]+))'

Instance Attribute Summary collapse

Attributes inherited from API

#long_url, #parttern, #shortner_key

Instance Method Summary collapse

Constructor Details

#initialize(short_url, options = {}) ⇒ Googl

Returns a new instance of Googl.



16
17
18
19
20
# File 'lib/url_expander/expanders/api/googl.rb', line 16

def initialize(short_url, options={})
  @parent_klass = self
  super(short_url,options)
  fetch_url
end

Instance Attribute Details

#parent_klassObject (readonly)

Returns the value of attribute parent_klass.



14
15
16
# File 'lib/url_expander/expanders/api/googl.rb', line 14

def parent_klass
  @parent_klass
end