Sha256: f9879943860c2a2f545011abb0c65f5ad52cb0ee1ec2c27b379663d1f9cf6d9a
Contents?: true
Size: 673 Bytes
Versions: 79
Compression:
Stored size: 673 Bytes
Contents
module Onebox module Mixins module TwitchOnebox def self.included(klass) klass.include(Onebox::Engine) klass.matches_regexp(klass.twitch_regexp) klass.include(InstanceMethods) end module InstanceMethods def twitch_id @url.match(self.class.twitch_regexp)[1] end def base_url "player.twitch.tv/?" end def to_html "<iframe src=\"//#{base_url}#{query_params}&autoplay=false\" width=\"620\" height=\"378\" frameborder=\"0\" style=\"overflow: hidden;\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"></iframe>" end end end end end
Version data entries
79 entries across 79 versions & 1 rubygems