Class: Onebox::Engine::GithubGistOnebox

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

Constant Summary

Constants included from Onebox::Engine

DEFUALT

Instance Attribute Summary

Attributes included from Onebox::Engine

#cache, #timeout

Instance Method Summary collapse

Methods included from Onebox::Engine

engines, included, #initialize, #options, #options=, #placeholder_html

Instance Method Details

#to_htmlObject



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

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

#urlObject



10
11
12
# File 'lib/onebox/engine/github_gist_onebox.rb', line 10

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