Eno::Section » #fieldset

fieldset(name) → Eno::Fieldset or nil
fieldset(name, options) → Eno::Fieldset or nil

Retrieve a fieldset from the section, optionally supplying an options.

enocolor ratings:
red = 5
green = 7
blue = 3
rubysection.fieldset('color ratings')        #=> #<Eno::Fieldset name="color ratings" entries=3>
section.fieldset('temperature ratings')  # raises an error

section.fieldset('temperature ratings', required: false)        #=> nil
section.fieldset('temperature ratings', enforce_element: true)  # raises an error



A string representing the name of the field to return.



A boolean stating whether the fieldset must exist in the document. (defaults to false)


Alias for enforce_element (this exists on many methods and depending on context refers to either element or value)

Return value

An Eno::Fieldset, or nil.