Class: Formation::Fieldset
Instance Attribute Summary collapse
-
#legend ⇒ Object
readonly
Returns the value of attribute legend.
Attributes inherited from Element
Instance Method Summary collapse
- #fields ⇒ Object
-
#initialize(name, options = {}) ⇒ Fieldset
constructor
A new instance of Fieldset.
Methods inherited from Element
Constructor Details
#initialize(name, options = {}) ⇒ Fieldset
Returns a new instance of Fieldset.
5 6 7 8 |
# File 'lib/formation/fieldset.rb', line 5 def initialize(name, = {}) @name = name @legend = [:legend] || Formation::Util.titleize(name) end |
Instance Attribute Details
#legend ⇒ Object (readonly)
Returns the value of attribute legend.
3 4 5 |
# File 'lib/formation/fieldset.rb', line 3 def legend @legend end |
Instance Method Details
#fields ⇒ Object
10 11 12 |
# File 'lib/formation/fieldset.rb', line 10 def fields @fields ||= [] end |