def add app
@has_app[app] = true
@apps << app
end
In the code above, instead of using
@has_app[app] = true
to keep track of the presence of 'app', couldn't we also say:
@apps.include? (app)
and do away with @has_app
?
I'm trying to understand why this separate variable is needed here at all (?).