# frozen_string_literal: true
module HTML
class Pipeline
module RubyMarkup
class Element
def initialize(word, reading, uri)
@word = word
@reading = reading
@uri = uri
end
def original
if uri
%([#{word}(#{reading})](#{uri}))
else
%([#{word}(#{reading})])
end
end
def to_html
if uri
%(#{word})
else
"#{word}"
end
end
private
attr_reader :word, :reading, :uri
end
end
end
end