Class: Plutonium::Wizard::FieldImporter::Spec
- Inherits:
-
Struct
- Object
- Struct
- Plutonium::Wizard::FieldImporter::Spec
- Defined in:
- lib/plutonium/wizard/field_importer.rb
Overview
The resolved import surface for one using: declaration.
Instance Attribute Summary collapse
-
#attribute_schema ⇒ Object
Returns the value of attribute attribute_schema.
-
#form_layout ⇒ Object
Returns the value of attribute form_layout.
-
#form_validators ⇒ Object
Returns the value of attribute form_validators.
-
#inputs ⇒ Object
Returns the value of attribute inputs.
-
#validate_fn ⇒ Object
Returns the value of attribute validate_fn.
Instance Method Summary collapse
-
#validate(data_slice) ⇒ Object
Run the imported validation over a staged data slice, returning a hash of => [messages] for the imported fields + :base.
Instance Attribute Details
#attribute_schema ⇒ Object
Returns the value of attribute attribute_schema
39 40 41 |
# File 'lib/plutonium/wizard/field_importer.rb', line 39 def attribute_schema @attribute_schema end |
#form_layout ⇒ Object
Returns the value of attribute form_layout
39 40 41 |
# File 'lib/plutonium/wizard/field_importer.rb', line 39 def form_layout @form_layout end |
#form_validators ⇒ Object
Returns the value of attribute form_validators
39 40 41 |
# File 'lib/plutonium/wizard/field_importer.rb', line 39 def form_validators @form_validators end |
#inputs ⇒ Object
Returns the value of attribute inputs
39 40 41 |
# File 'lib/plutonium/wizard/field_importer.rb', line 39 def inputs @inputs end |
#validate_fn ⇒ Object
Returns the value of attribute validate_fn
39 40 41 |
# File 'lib/plutonium/wizard/field_importer.rb', line 39 def validate_fn @validate_fn end |
Instance Method Details
#validate(data_slice) ⇒ Object
Run the imported validation over a staged data slice, returning a hash of
=> [messages] for the imported fields + :base. Empty when
validate: false.
43 44 45 |
# File 'lib/plutonium/wizard/field_importer.rb', line 43 def validate(data_slice) validate_fn ? validate_fn.call(data_slice) : {} end |