I heard today that Hillary Clinton’s only chance to win the Democratic
primary is “to change the way math works”. Change math? Why do that
when she could just use Ruby:
return clinton.delegates, obama.delegates
return (clinton.delegates*1.3).ceil, (obama.delegates/1.3).floor
primary = DemocraticParty::Primary.new(2008)
The lesson: you may not be able to change the Primary but you can
This code is broken.
Because there’s no tests written for it.
Also, a Primary should be available to not only the DemocraticParty,
but also the RepublicanParty. This is due to the country being a
Democracy. Moving forth, the DemocraticParty should simply be called
“Democrat”, as the RepublicanParty should also be called “Republican”.
Both of these classes should inherit from Party, as they both have the
same core setup. You should not be calling return in the
delegate_count method, since this will already return the last
Continuing, the module “ClintonRevisions” should actually be
“Revisions” with sub-modules of Clinton, Obama, Paul, and if necessary
Giuliani (although I’ve heard rumours these last two may be deprecated
in the future).
Glad to assist.