Class: BulletmarkRepairer::AssociationsBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/bulletmark_repairer/associations_builder.rb

Instance Method Summary collapse

Instance Method Details

#associationsObject



21
22
23
# File 'lib/bulletmark_repairer/associations_builder.rb', line 21

def associations
  @associations ||= {}
end

#build(marker) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/bulletmark_repairer/associations_builder.rb', line 7

def build(marker)
  return if marker.skip?

  if associations[marker.index]
    associations[marker.index].add(marker)
  else
    associations[marker.index] = Associations.new(
      marker,
      @application_associations,
      @loaded_associations
    )
  end
end