Class: UrlExpander::Expanders::Dldbz
- Defined in:
- lib/url_expander/expanders/api/dldbz.rb
Overview
Expand dld.bz URLS Usage: UrlExpander::Client.expand(“dld.bz/ahsJ2”)
Defined Under Namespace
Classes: Request
Constant Summary collapse
- PATTERN =
NOTICE: We ignored the / before the key
%r'(http://dld\.bz/([\w/]+))'
Instance Attribute Summary collapse
-
#parent_klass ⇒ Object
readonly
Returns the value of attribute parent_klass.
-
#short_url ⇒ Object
readonly
Returns the value of attribute short_url.
Attributes inherited from API
#long_url, #parttern, #shortner_key
Instance Method Summary collapse
-
#initialize(short_url, options = {}) ⇒ Dldbz
constructor
A new instance of Dldbz.
Constructor Details
#initialize(short_url, options = {}) ⇒ Dldbz
Returns a new instance of Dldbz.
15 16 17 18 19 |
# File 'lib/url_expander/expanders/api/dldbz.rb', line 15 def initialize(short_url, ={}) @parent_klass = self @short_url = short_url fetch_url end |
Instance Attribute Details
#parent_klass ⇒ Object (readonly)
Returns the value of attribute parent_klass.
13 14 15 |
# File 'lib/url_expander/expanders/api/dldbz.rb', line 13 def parent_klass @parent_klass end |
#short_url ⇒ Object (readonly)
Returns the value of attribute short_url.
13 14 15 |
# File 'lib/url_expander/expanders/api/dldbz.rb', line 13 def short_url @short_url end |