class Canvas::Workflow::Tags::IconTag

Public Class Methods

new(tag_name, text, tokens) click to toggle source
Calls superclass method
# File lib/canvas/workflow/tags/icon.rb, line 5
def initialize(tag_name, text, tokens)
  raise ArgumentError.new("Cannot have empty icon") if text.empty?

  super
  @icon = text.strip
end

Public Instance Methods

render(context) click to toggle source
# File lib/canvas/workflow/tags/icon.rb, line 12
def render(context)
  "<i class=\"icon-#{@icon}\"></i>"
end