Class: UrlExpander::Expanders::Decenturl
- Defined in:
- lib/url_expander/expanders/api/decenturl.rb
Overview
Expand Budurl URLS Usage: UrlExpander::Client.expand(“decenturl.com/youtube/medieval”) UrlExpander::Client.expand(“youtube.decenturl.com/medieval”)
Defined Under Namespace
Classes: Request
Constant Summary collapse
- PATTERN =
NOTICE: We ignored the / before the key decenturl.com/youtube/medieval => ‘youtube/medieval’ without /
%r'(http://(?:(?>[a-z0-9-]*\.)+?|)decenturl\.com/([\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 = {}) ⇒ Decenturl
constructor
A new instance of Decenturl.
Constructor Details
#initialize(short_url, options = {}) ⇒ Decenturl
Returns a new instance of Decenturl.
17 18 19 20 21 |
# File 'lib/url_expander/expanders/api/decenturl.rb', line 17 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.
15 16 17 |
# File 'lib/url_expander/expanders/api/decenturl.rb', line 15 def parent_klass @parent_klass end |
#short_url ⇒ Object (readonly)
Returns the value of attribute short_url.
15 16 17 |
# File 'lib/url_expander/expanders/api/decenturl.rb', line 15 def short_url @short_url end |