Class: MissionKontrolRelay::AssociationMappingService

Inherits:
Object
  • Object
show all
Defined in:
app/services/mission_kontrol_relay/association_mapping_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ AssociationMappingService

Returns a new instance of AssociationMappingService.


5
6
7
# File 'app/services/mission_kontrol_relay/association_mapping_service.rb', line 5

def initialize(model)
  @model = model
end

Instance Method Details

#buildObject


9
10
11
12
13
14
15
# File 'app/services/mission_kontrol_relay/association_mapping_service.rb', line 9

def build
  {
    model: @model.name,
    columns: model_columns,
    associations: model_associations
  }
end