Class: Web::Narflates::Link

Inherits:
Object show all
Defined in:
lib/web/template.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(link, contents) ⇒ Link

Returns a new instance of Link.



322
323
324
325
# File 'lib/web/template.rb', line 322

def initialize (link,contents)
	@link = link
	@contents = contents
end

Instance Method Details



327
328
329
330
331
332
333
# File 'lib/web/template.rb', line 327

def print (globals,io) 
	io << "<a href=\"#{globals.resolve(@link).value.get_link}\">"
	@contents.each { |i| 
	  i.print(globals,io)
	} 
	io << "</a>"
end