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
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