Class: Web::Narflates::Link
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(link, contents) ⇒ Link
constructor
A new instance of Link.
- #print(globals, io) ⇒ Object
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
#print(globals, io) ⇒ Object
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 |