Class: Biovision::Components::Content::Oembed::TwitterReceiver

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

Overview

OEmbed receiver for Twitter

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/twitter_receiver.rb', line 13

def self.domains
  %w[twitter.com www.twitter.com]
end

Instance Method Details

#code_urlObject



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

def code_url
  "https://publish.twitter.com/oembed?url=#{CGI.escape(@url)}"
end