Class: Campo::Literal
Overview
add whatever you need to with a literal
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Attributes included from Childish
Instance Method Summary collapse
-
#initialize(s) ⇒ Literal
constructor
A new instance of Literal.
Methods inherited from Base
#labelled, #on_output, #output, output, quotable, unhash
Methods included from Convenience
#bit_of_ruby, #checkbox, #fieldset, #input, #literal, #radio, #select, #submit, #text, #textarea
Methods included from Iding
Methods included from Childish
Constructor Details
#initialize(s) ⇒ Literal
Returns a new instance of Literal.
325 326 327 328 329 330 331 332 333 |
# File 'lib/campo.rb', line 325 def initialize( s ) super( nil ) # no name needed @s = s self.on_output do |n=0, tab=2| (" " * n * tab) + @s end self end |