Module: Fieldable
- Included in:
- Array, FieldedArray
- Defined in:
- lib/rq/arrayfields.rb
Overview
fields set and subsequently be auto-extended by ArrayFields
Instance Attribute Summary collapse
-
#fieldset ⇒ Object
readonly
access to fieldset.
Instance Method Summary collapse
-
#fields ⇒ Object
access to field list.
-
#fields=(fields) ⇒ Object
sets fields an dynamically extends this Array instance with methods for keyword access.
Instance Attribute Details
#fieldset ⇒ Object (readonly)
access to fieldset
270 271 272 |
# File 'lib/rq/arrayfields.rb', line 270 def fieldset @fieldset end |
Instance Method Details
#fields ⇒ Object
access to field list
274 275 276 |
# File 'lib/rq/arrayfields.rb', line 274 def fields @fieldset and @fieldset.fields end |
#fields=(fields) ⇒ Object
sets fields an dynamically extends this Array instance with methods for keyword access
257 258 259 260 261 262 263 264 265 266 |
# File 'lib/rq/arrayfields.rb', line 257 def fields= fields extend ArrayFields unless defined? @fieldset @fieldset = if ArrayFields::FieldSet === fields fields else ArrayFields::FieldSet.new fields end end |