class Canvas::Workflow::Tags::GistTag
Public Class Methods
new(tag_name, text, tokens)
click to toggle source
Calls superclass method
# File lib/canvas/workflow/tags/gist.rb, line 5 def initialize(tag_name, text, tokens) raise ArgumentError.new("Cannot have empty gist") if text.empty? super @gist = text.strip end
Public Instance Methods
render(context)
click to toggle source
# File lib/canvas/workflow/tags/gist.rb, line 12 def render(context) "<p><iframe style=\"width: 100%; height: 400px;\" title=\"GitHub gist\" src=\"https://www.edu-apps.org/tools/github/github_summary_gist.html\##{@gist}\" width=\"100%\" height=\"400\" allowfullscreen=\"allowfullscreen\" webkitallowfullscreen=\"webkitallowfullscreen\" mozallowfullscreen=\"mozallowfullscreen\"></iframe></p>" end