Class: Web::Narflates::Text

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

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Text

Returns a new instance of Text.



382
383
384
# File 'lib/web/template.rb', line 382

def initialize (name)
	@name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



381
382
383
# File 'lib/web/template.rb', line 381

def name
  @name
end

Instance Method Details



386
387
388
389
# File 'lib/web/template.rb', line 386

def print (globals,io) 
	var = globals.resolve(@name)
	io << "<input type=\"text\" name=\"#{var.canonical_name}\" value=\"#{var.value}\">"
end