Module: Extractula::OEmbed::InstanceMethods
- Defined in:
- lib/extractula/oembed.rb
Instance Method Summary collapse
- #image_urls ⇒ Object
- #initialize(*args) ⇒ Object
- #oembed ⇒ Object
- #oembed_endpoint ⇒ Object
- #oembed_format_param_required? ⇒ Boolean
- #oembed_max_height ⇒ Object
- #oembed_max_width ⇒ Object
- #oembed_request ⇒ Object
- #oembed_request_url ⇒ Object
- #title ⇒ Object
- #video_embed ⇒ Object
Instance Method Details
#image_urls ⇒ Object
104 105 106 |
# File 'lib/extractula/oembed.rb', line 104 def image_urls [ .url ] if && .type == 'photo' end |
#initialize(*args) ⇒ Object
63 64 65 66 |
# File 'lib/extractula/oembed.rb', line 63 def initialize(*args) super @oembed = Extractula::OEmbed.request() end |
#oembed ⇒ Object
84 85 86 |
# File 'lib/extractula/oembed.rb', line 84 def @oembed end |
#oembed_endpoint ⇒ Object
68 69 70 |
# File 'lib/extractula/oembed.rb', line 68 def self.class. end |
#oembed_format_param_required? ⇒ Boolean
80 81 82 |
# File 'lib/extractula/oembed.rb', line 80 def self.class. end |
#oembed_max_height ⇒ Object
76 77 78 |
# File 'lib/extractula/oembed.rb', line 76 def self.class. end |
#oembed_max_width ⇒ Object
72 73 74 |
# File 'lib/extractula/oembed.rb', line 72 def self.class. end |
#oembed_request ⇒ Object
88 89 90 91 92 93 94 |
# File 'lib/extractula/oembed.rb', line 88 def request = "#{}?url=#{}" request += "&format=json" if request += "&maxwidth=#{}" if request += "&maxheight=#{}" if request end |
#oembed_request_url ⇒ Object
96 97 98 |
# File 'lib/extractula/oembed.rb', line 96 def url.url end |
#title ⇒ Object
100 101 102 |
# File 'lib/extractula/oembed.rb', line 100 def title ? .title : super end |
#video_embed ⇒ Object
108 109 110 |
# File 'lib/extractula/oembed.rb', line 108 def .html if end |