Class: TypedEAV::SchemaPortability::ImportIndex

Inherits:
Object
  • Object
show all
Defined in:
lib/typed_eav/schema_portability/import_index.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fieldsObject (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

#sectionsObject (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