Module: Onebox::Mixins::TwitchOnebox::InstanceMethods
- Defined in:
- lib/onebox/mixins/twitch_onebox.rb
Instance Method Summary collapse
Instance Method Details
#base_url ⇒ Object
19 20 21 |
# File 'lib/onebox/mixins/twitch_onebox.rb', line 19 def base_url "player.twitch.tv/?" end |
#placeholder_html ⇒ Object
23 24 25 |
# File 'lib/onebox/mixins/twitch_onebox.rb', line 23 def placeholder_html ::Onebox::Helpers.video_placeholder_html end |
#to_html ⇒ Object
27 28 29 30 31 |
# File 'lib/onebox/mixins/twitch_onebox.rb', line 27 def to_html " <iframe src=\"https://\#{base_url}\#{query_params}&parent=\#{options[:hostname]}&autoplay=false\" width=\"620\" height=\"378\" frameborder=\"0\" style=\"overflow: hidden;\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"></iframe>\n HTML\nend\n" |
#twitch_id ⇒ Object
15 16 17 |
# File 'lib/onebox/mixins/twitch_onebox.rb', line 15 def twitch_id @url.match(self.class.twitch_regexp)[1] end |