Class: Onebox::Engine::XkcdOnebox

Inherits:
Object
  • Object
show all
Includes:
Onebox::Engine, JSON, LayoutSupport
Defined in:
lib/onebox/engine/xkcd_onebox.rb

Constant Summary

Constants included from Onebox::Engine

DEFAULT

Instance Attribute Summary

Attributes included from Onebox::Engine

#cache, #timeout, #uri

Instance Method Summary collapse

Methods included from LayoutSupport

#layout, max_text, #to_html

Methods included from Onebox::Engine

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

Instance Method Details

#urlObject


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

def url
  "https://xkcd.com/#{match[:comic_id]}/info.0.json"
end