Skip to content

Instantly share code, notes, and snippets.

@rippinrobr
Created October 30, 2010 14:54
Show Gist options
  • Save rippinrobr/655368 to your computer and use it in GitHub Desktop.
Save rippinrobr/655368 to your computer and use it in GitHub Desktop.
CodeGen.create_models and CodeGen.create_model methods
def create_models
# The where method here is from System.Linq
@elem_svc.get_views.where( lambda{ |w| w.end_date.nil? }).each do |e|
create_model(e)
end
end
# Creates each individual model for the assembly and queues up
# the domain level classes that are need to support the models
def create_model(view_obj)
model_type, domains_to_create = @model_gen.generate(view_obj.name,
@elem_svc.get_elements_in_view(view_obj.id))
@domain_classes_to_create = @domain_classes_to_create | domains_to_create
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment