class Scrollytelling::Piwik::WidgetType

Public Class Methods

new(url:, site_id:) click to toggle source
# File lib/scrollytelling/piwik/widget_type.rb, line 6
def initialize(url:, site_id:)
  @url = url
  @site_id = site_id
end

Public Instance Methods

name() click to toggle source
# File lib/scrollytelling/piwik/widget_type.rb, line 11
def name
  'scrollytelling_piwik'
end
render(template, entry) click to toggle source
# File lib/scrollytelling/piwik/widget_type.rb, line 19
def render(template, entry)
  template.render('scrollytelling/piwik/widget.html.erb', entry: entry, url: @url, site_id: @site_id)
end
roles() click to toggle source
# File lib/scrollytelling/piwik/widget_type.rb, line 15
def roles
  ['piwik']
end