This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module GoggleBox | |
| # require 'httparty' | |
| module TVRage | |
| class Show | |
| def self.search opts={} | |
| "searching TVRage for shows with options #{opts.inspect}" | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def youtube_video(url, text, height, width) | |
| altered_text = text.gsub(url,"<iframe title='YouTube video player' class='youtube-player' type='text/html' width='#{width}' height='#{height}' src='#{url}' frameborder='0'></iframe>") | |
| end | |
| def vimeo_video(url, text, height, width) | |
| ident_regexp = /\/[0-9]{3,}/ | |
| url_ident = url.scan(ident_regexp).to_s | |
| altered_text = text.gsub(url,"<p><iframe title='Vimeo Video Player' src='http://player.vimeo.com/video#{url_ident}' width='#{width}' height='#{height}' frameborder='0'></iframe></p>") | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Less | |
| class Engine | |
| attr_reader :css | |
| attr_reader :parser, :build_handler, :root_node | |
| def initialize(less) | |
| @less = less.dup | |
| @parser = LessGrammarParser.new | |
| @build_handler = BuildHandler.new | |
| parse |