class Utopia::Project::Linkify
Public Class Methods
new(base, language, text)
click to toggle source
@parameter base [Base] The base data.
Calls superclass method
# File lib/utopia/project/linkify.rb, line 29 def initialize(base, language, text) @base = base @language = language super(text) end
Public Instance Methods
apply(output = Trenni::Builder.new)
click to toggle source
Calls superclass method
# File lib/utopia/project/linkify.rb, line 50 def apply(output = Trenni::Builder.new) output.inline('code', class: "language-#{@language.name}") do super end return output.to_str end
link_to(definition, text)
click to toggle source
# File lib/utopia/project/linkify.rb, line 42 def link_to(definition, text) Trenni::Builder.fragment do |builder| builder.inline('a', href: @base.link_for(definition), title: definition.qualified_name) do builder.text(text) end end end
text_for(range)
click to toggle source
Calls superclass method
# File lib/utopia/project/linkify.rb, line 36 def text_for(range) text = super(range) return Trenni::Strings.to_html(text) end