Class: UrlExpander::Expanders::Notlong
- Defined in:
- lib/url_expander/expanders/basic/notlong.rb
Overview
Expand notlong.com URLS Usage: UrlExpander::Client.expand(“moski.notlong.com”)
Defined Under Namespace
Classes: Request
Constant Summary collapse
- PATTERN =
%r'(http://([\w/]+)\.notlong\.com)'
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
Custom fetcher.
-
#initialize(short_url = "", options = {}) ⇒ Notlong
constructor
A new instance of Notlong.
Constructor Details
#initialize(short_url = "", options = {}) ⇒ Notlong
Returns a new instance of Notlong.
12 13 14 15 |
# File 'lib/url_expander/expanders/basic/notlong.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/notlong.rb', line 10 def parent_klass @parent_klass end |
Instance Method Details
#fetch_url(path) ⇒ Object
Custom fetcher.
18 19 20 |
# File 'lib/url_expander/expanders/basic/notlong.rb', line 18 def fetch_url(path) super("/#{path}") end |