Class: UrlExpander::Expanders::Snipurl

Inherits:
Basic
  • Object
show all
Defined in:
lib/url_expander/expanders/basic/snipurl.rb

Overview

Expand snipurl.com URLS Usage: UrlExpander::Client.expand(“snipurl.com/209hem”) UrlExpander::Client.expand(“sn.im/209hem”)

@NOTE: This service does provide an api but it is not working

Defined Under Namespace

Classes: Request

Constant Summary collapse

PATTERN =
%r'(http://(?:snipurl\.com|sn\.im|cl\.lk|snipr\.com|snurl\.com)(/[\w/]+))'

Instance Attribute Summary collapse

Attributes inherited from Basic

#long_url, #parttern

Instance Method Summary collapse

Constructor Details

#initialize(short_url = "", options = {}) ⇒ Snipurl

Returns a new instance of Snipurl.



15
16
17
18
# File 'lib/url_expander/expanders/basic/snipurl.rb', line 15

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

Instance Attribute Details

#parent_klassObject (readonly)

Returns the value of attribute parent_klass.



13
14
15
# File 'lib/url_expander/expanders/basic/snipurl.rb', line 13

def parent_klass
  @parent_klass
end