Class: UrlExpander::Expanders::Youtube
- Defined in:
- lib/url_expander/expanders/basic/youtube.rb
Overview
Expand Youtu.be URLS Usage: UrlExpander::Client.expand(“youtu.be/bINUfbLV_0M”) UrlExpander::Client.expand(“y2u.be/bINUfbLV_0M”)
Defined Under Namespace
Classes: Request
Constant Summary collapse
- PATTERN =
%r'(http://(?:youtu\.be|y2u\.be)(/[\w/]+))'
Instance Attribute Summary collapse
-
#parent_klass ⇒ Object
readonly
Returns the value of attribute parent_klass.
Attributes inherited from Basic
Instance Method Summary collapse
-
#initialize(short_url = "", options = {}) ⇒ Youtube
constructor
A new instance of Youtube.
Constructor Details
#initialize(short_url = "", options = {}) ⇒ Youtube
Returns a new instance of Youtube.
13 14 15 16 |
# File 'lib/url_expander/expanders/basic/youtube.rb', line 13 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.
11 12 13 |
# File 'lib/url_expander/expanders/basic/youtube.rb', line 11 def parent_klass @parent_klass end |