class Marsdawn::Site::Link
Attributes
full_path[R]
site[R]
title[R]
uri[R]
Public Class Methods
new(site, uri, title=nil)
click to toggle source
# File lib/marsdawn/site/link.rb, line 7 def initialize site, uri, title=nil @uri = uri @title = (title.nil? ? site.page_title(uri) : title) @site = site @full_path = @site.full_path(@uri) end
Public Instance Methods
page()
click to toggle source
# File lib/marsdawn/site/link.rb, line 14 def page @site.page @uri end
to_html()
click to toggle source
# File lib/marsdawn/site/link.rb, line 22 def to_html t = CGI.escapeHTML(@title) %!<a href="#{@full_path}" title="#{t}">#{t}</a>! end
to_s()
click to toggle source
# File lib/marsdawn/site/link.rb, line 18 def to_s to_html end