class UrlExpander::Expanders::Twurlnl

Expand Twurl.nl URLS Usage: UrlExpander::Client.expand(“twurl.nl/e6mglc”)

Constants

PATTERN

Attributes

parent_klass[R]

Public Class Methods

new(short_url="",options={}) click to toggle source
Calls superclass method UrlExpander::Expanders::Basic::new
# File lib/url_expander/expanders/basic/twurlnl.rb, line 14
def initialize(short_url="",options={})
  @parent_klass = self
  super(short_url,options)
end

Public Instance Methods

fetch_url(path) click to toggle source

Custom fetcher.

Calls superclass method UrlExpander::Expanders::Basic#fetch_url
# File lib/url_expander/expanders/basic/twurlnl.rb, line 20
def fetch_url(path)
  url = super(path)
  raise UrlExpander::Error.new('page not found',404) if url == "http://tweetburner.com/pages/blocked"
  url
end