Create a gist now

Instantly share code, notes, and snippets.

Embed
Design Pattern: Builder and Car
class CarConstructionDirector
def construct_car(builder:)
builder.build_car_frame
builder.add_engine
builder.add_front_wheels
builder.add_back_wheels
builder.add_dashboard
builder.add_energy_source
builder.car
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment