Class: Web::Narflates::Text
Overview
:nodoc:
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Text
constructor
A new instance of Text.
- #print(globals, io) ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
381 382 383 |
# File 'lib/web/template.rb', line 381 def name @name end |
Instance Method Details
#print(globals, io) ⇒ Object
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 |