Class: TypedEAV::SchemaPortability::ImportIndex
- Inherits:
-
Object
- Object
- TypedEAV::SchemaPortability::ImportIndex
- Defined in:
- lib/typed_eav/schema_portability/import_index.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#sections ⇒ Object
readonly
Returns the value of attribute sections.
Instance Method Summary collapse
- #field_identity(field_or_entry) ⇒ Object
-
#initialize(field_entries, section_entries) ⇒ ImportIndex
constructor
A new instance of ImportIndex.
- #section_identity(section_or_entry) ⇒ Object
Constructor Details
#initialize(field_entries, section_entries) ⇒ ImportIndex
Returns a new instance of ImportIndex.
8 9 10 11 |
# File 'lib/typed_eav/schema_portability/import_index.rb', line 8 def initialize(field_entries, section_entries) @fields = preload_fields(field_entries) @sections = preload_sections(section_entries) end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
6 7 8 |
# File 'lib/typed_eav/schema_portability/import_index.rb', line 6 def fields @fields end |
#sections ⇒ Object (readonly)
Returns the value of attribute sections.
6 7 8 |
# File 'lib/typed_eav/schema_portability/import_index.rb', line 6 def sections @sections end |
Instance Method Details
#field_identity(field_or_entry) ⇒ Object
13 14 15 |
# File 'lib/typed_eav/schema_portability/import_index.rb', line 13 def field_identity(field_or_entry) identity(field_or_entry, :name) end |
#section_identity(section_or_entry) ⇒ Object
17 18 19 |
# File 'lib/typed_eav/schema_portability/import_index.rb', line 17 def section_identity(section_or_entry) identity(section_or_entry, :code) end |