Class: Campo::Legend
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#attributes, #attributes The element's html attributes., #fields, #fields The element's child elements.
Attributes included from Childish
Instance Method Summary collapse
-
#initialize(inner, attributes = {}) ⇒ Legend
constructor
A new instance of Legend.
Methods inherited from Base
#each, #labelled, #on_output, #output, output, quotable, unhash
Methods included from Convenience
#bit_of_ruby, #checkbox, #fieldset, #hidden, #input, #literal, #password, #radio, #select, #submit, #text, #textarea
Methods included from Iding
Methods included from Childish
Constructor Details
#initialize(inner, attributes = {}) ⇒ Legend
Returns a new instance of Legend.
684 685 686 687 688 689 690 691 692 |
# File 'lib/campo/campo.rb', line 684 def initialize( inner, attributes={} ) super( nil, attributes ) @attributes.delete(:name) @inner = inner self.on_output do |n=0, tab=2| %Q!#{" " * n * tab}%legend{ #{Base.unhash( @attributes )} }#{@inner}! end end |