Class: Biovision::Components::Content::Oembed::YoutubeReceiver

Inherits:
Receiver
  • Object
show all
Defined in:
app/lib/biovision/components/content/oembed/youtube_receiver.rb

Overview

OEmbed receiver for YouTube

Constant Summary

Constants inherited from Receiver

Receiver::PATTERN

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Receiver

[], #code, convert, #fallback, #initialize, seed, slug

Constructor Details

This class inherits a constructor from Biovision::Components::Content::Oembed::Receiver

Class Method Details

.domainsObject



13
14
15
# File 'app/lib/biovision/components/content/oembed/youtube_receiver.rb', line 13

def self.domains
  %w[www.youtube.com youtube.com youtu.be]
end

Instance Method Details

#code_urlObject



9
10
11
# File 'app/lib/biovision/components/content/oembed/youtube_receiver.rb', line 9

def code_url
  "https://www.youtube.com/oembed?url=#{CGI.escape(@url)}&format=json"
end