Class: Onebox::Engine::GithubGistOnebox

Inherits:
Object
  • Object
show all
Includes:
Onebox::Engine
Defined in:
lib/onebox/engine/github_gist_onebox.rb

Instance Attribute Summary

Attributes included from Onebox::Engine

#cache, #timeout

Instance Method Summary collapse

Methods included from Onebox::Engine

engines, included, #initialize, #placeholder_html

Instance Method Details

#to_htmlObject



19
20
21
# File 'lib/onebox/engine/github_gist_onebox.rb', line 19

def to_html
  "<script src=\"//gist.github.com/#{match[:sha]}.js\"></script>"
end

#urlObject



15
16
17
# File 'lib/onebox/engine/github_gist_onebox.rb', line 15

def url
  "https://api.github.com/gists/#{match[:sha]}"
end