Class: UrlExpander::Expanders::Adjix
- Defined in:
- lib/url_expander/expanders/basic/adjix.rb
Overview
Expand Adjix URLS Usage: UrlExpander::Client.expand(“adjix.com/cm4m”)
Defined Under Namespace
Classes: Request
Constant Summary collapse
- PATTERN =
%r'(http://(?:adjix\.com|ad\.vu)(/[\w/]+))'
Instance Attribute Summary collapse
-
#parent_klass ⇒ Object
readonly
Returns the value of attribute parent_klass.
Attributes inherited from Basic
Instance Method Summary collapse
- #fetch_url(path) ⇒ Object
-
#initialize(short_url = "", options = {}) ⇒ Adjix
constructor
A new instance of Adjix.
Constructor Details
#initialize(short_url = "", options = {}) ⇒ Adjix
Returns a new instance of Adjix.
12 13 14 15 |
# File 'lib/url_expander/expanders/basic/adjix.rb', line 12 def initialize(short_url="", ={}) @parent_klass = self super(short_url, ) end |
Instance Attribute Details
#parent_klass ⇒ Object (readonly)
Returns the value of attribute parent_klass.
10 11 12 |
# File 'lib/url_expander/expanders/basic/adjix.rb', line 10 def parent_klass @parent_klass end |
Instance Method Details
#fetch_url(path) ⇒ Object
17 18 19 20 21 |
# File 'lib/url_expander/expanders/basic/adjix.rb', line 17 def fetch_url(path) url = super(path) raise UrlExpander::Error.new('page not found',404) if url == 'http://www.adjix.com/notfound.html' url end |