Refactoring Generators::Base.
Refactoring Generators::Base.

The defaults hash isn't used unless the +class_options+ hash has a
particular key, so we don't need to compute it unless this is true.

Also moving some code for extracting a module into its own method.

kaspth/rails,ledestin/rails,shioyama/rails,mohitnatoo/rails,MichaelSp/rails,illacceptanything/illacceptanything,rossta/rails,utilum/rails,rafaelfranca/omg-rails,sergey-alekseev/rails,rails/rails,eileencodes/rails,utilum/rails,kaspth/rails,mtsmfm/rails,eileencodes/rails,EmmaB/rails-1,hanystudy/rails,esparta/rails,tgxworld/rails,rafaelfranca/omg-rails,amoody2108/TechForJustice,BlakeWilliams/rails,jeremy/rails,Stellenticket/rails,yahonda/rails,baerjam/rails,georgeclaghorn/rails,gcourtemanche/rails,yalab/rails,eileencodes/rails,palkan/rails,pschambacher/rails,lcreid/rails,aditya-kapoor/rails,Stellenticket/rails,yawboakye/rails,kddeisz/rails,travisofthenorth/rails,amoody2108/TechForJustice,ttanimichi/rails,odedniv/rails,jeremy/rails,deraru/rails,Erol/rails,ledestin/rails,coreyward/rails,riseshia/railsguides.kr,shioyama/rails,arunagw/rails,bolek/rails,baerjam/rails,brchristian/rails,samphilipd/rails,notapatch/rails,utilum/rails,pvalena/rails,Spin42/rails,Edouard-chin/rails,Envek/rails,prathamesh-sonpatki/rails,illacceptanything/illacceptanything,rails/rails,georgeclaghorn/rails,illacceptanything/illacceptanything,mohitnatoo/rails,untidy-hair/rails,yalab/rails,rails/rails,arjes/rails,vipulnsward/rails,mtsmfm/railstest,assain/rails,Envek/rails,aditya-kapoor/rails,esparta/rails,kmcphillips/rails,gauravtiwari/rails,voray/rails,mechanicles/rails,bolek/rails,Erol/rails,georgeclaghorn/rails,marklocklear/rails,assain/rails,Spin42/rails,yawboakye/rails,mathieujobin/reduced-rails-for-travis,deraru/rails,marklocklear/rails,samphilipd/rails,bradleypriest/rails,Envek/rails,tijwelch/rails,Sen-Zhang/rails,88rabbit/newRails,schuetzm/rails,koic/rails,assain/rails,kaspth/rails,iainbeeston/rails,kamipo/rails,yasslab/railsguides.jp,yalab/rails,amoody2108/TechForJustice,yahonda/rails,felipecvo/rails,marklocklear/rails,illacceptanything/illacceptanything,untidy-hair/rails,illacceptanything/illacceptanything,MSP-Greg/rails,matrinox/rails,Sen-Zhang/rails,MichaelSp/rails,Stellenticket/rails,schuetzm/rails,arunagw/rails,tjschuck/rails,felipecvo/rails,illacceptanything/illacceptanything,yawboakye/rails,brchristian/rails,Erol/rails,lucasmazza/rails,mathieujobin/reduced-rails-for-travis,notapatch/rails,xlymian/rails,tjschuck/rails,lucasmazza/rails,kenta-s/rails,iainbeeston/rails,mijoharas/rails,shioyama/rails,stefanmb/rails,joonyou/rails,kmcphillips/rails,riseshia/railsguides.kr,repinel/rails,kamipo/rails,MSP-Greg/rails,schuetzm/rails,88rabbit/newRails,illacceptanything/illacceptanything,brchristian/rails,fabianoleittes/rails,kmayer/rails,stefanmb/rails,kachick/rails,iainbeeston/rails,jeremy/rails,rossta/rails,rafaelfranca/omg-rails,Sen-Zhang/rails,eileencodes/rails,Vasfed/rails,utilum/rails,ngpestelos/rails,gfvcastro/rails,printercu/rails,printercu/rails,pvalena/rails,elfassy/rails,maicher/rails,arunagw/rails,illacceptanything/illacceptanything,samphilipd/rails,elfassy/rails,printercu/rails,kachick/rails,richseviora/rails,gfvcastro/rails,travisofthenorth/rails,bradleypriest/rails,gavingmiller/rails,travisofthenorth/rails,mechanicles/rails,mechanicles/rails,prathamesh-sonpatki/rails,kirs/rails-1,vassilevsky/rails,gauravtiwari/rails,Erol/rails,joonyou/rails,mathieujobin/reduced-rails-for-travis,kirs/rails-1,mijoharas/rails,pschambacher/rails,tgxworld/rails,rbhitchcock/rails,betesh/rails,mohitnatoo/rails,yasslab/railsguides.jp,maicher/rails,Stellenticket/rails,flanger001/rails,kamipo/rails,arunagw/rails,illacceptanything/illacceptanything,EmmaB/rails-1,kachick/rails,MichaelSp/rails,georgeclaghorn/rails,bogdanvlviv/rails,bradleypriest/rails,fabianoleittes/rails,mohitnatoo/rails,gcourtemanche/rails,Edouard-chin/rails,kddeisz/rails,mijoharas/rails,repinel/rails,yhirano55/rails,bogdanvlviv/rails,yahonda/rails,gfvcastro/rails,betesh/rails,aditya-kapoor/rails,arjes/rails,prathamesh-sonpatki/rails,voray/rails,maicher/rails,coreyward/rails,untidy-hair/rails,repinel/rails,Edouard-chin/rails,illacceptanything/illacceptanything,illacceptanything/illacceptanything,starknx/rails,ngpestelos/rails,repinel/rails,BlakeWilliams/rails,odedniv/rails,BlakeWilliams/rails,notapatch/rails,rbhitchcock/rails,gauravtiwari/rails,mtsmfm/railstest,ngpestelos/rails,mtsmfm/rails,tjschuck/rails,yalab/rails,tijwelch/rails,tijwelch/rails,yahonda/rails,sealocal/rails,jeremy/rails,vassilevsky/rails,88rabbit/newRails,matrinox/rails,prathamesh-sonpatki/rails,yhirano55/rails,sealocal/rails,assain/rails,kirs/rails-1,sergey-alekseev/rails,Vasfed/rails,elfassy/rails,EmmaB/rails-1,rbhitchcock/rails,hanystudy/rails,ledestin/rails,arjes/rails,xlymian/rails,voray/rails,riseshia/railsguides.kr,ttanimichi/rails,lcreid/rails,palkan/rails,alecspopa/rails,travisofthenorth/rails,flanger001/rails,yasslab/railsguides.jp,gfvcastro/rails,palkan/rails,joonyou/rails,starknx/rails,tgxworld/rails,illacceptanything/illacceptanything,Envek/rails,Vasfed/rails,mtsmfm/rails,mtsmfm/railstest,yhirano55/rails,baerjam/rails,notapatch/rails,deraru/rails,felipecvo/rails,fabianoleittes/rails,starknx/rails,kenta-s/rails,odedniv/rails,coreyward/rails,mechanicles/rails,kddeisz/rails,bolek/rails,vipulnsward/rails,vassilevsky/rails,stefanmb/rails,esparta/rails,schuetzm/rails,gavingmiller/rails,alecspopa/rails,BlakeWilliams/rails,richseviora/rails,flanger001/rails,kddeisz/rails,lcreid/rails,betesh/rails,flanger001/rails,illacceptanything/illacceptanything,tgxworld/rails,kmayer/rails,shioyama/rails,yawboakye/rails,Edouard-chin/rails,kmcphillips/rails,MSP-Greg/rails,vipulnsward/rails,ttanimichi/rails,aditya-kapoor/rails,Vasfed/rails,esparta/rails,rails/rails,koic/rails,joonyou/rails,sealocal/rails,bogdanvlviv/rails,gcourtemanche/rails,lucasmazza/rails,betesh/rails,illacceptanything/illacceptanything,bogdanvlviv/rails,matrinox/rails,lcreid/rails,yhirano55/rails,xlymian/rails,illacceptanything/illacceptanything,pvalena/rails,deraru/rails,richseviora/rails,kmcphillips/rails,palkan/rails,Spin42/rails,pschambacher/rails,printercu/rails,sergey-alekseev/rails,rossta/rails,tjschuck/rails,vipulnsward/rails,gavingmiller/rails,kenta-s/rails,alecspopa/rails,fabianoleittes/rails,kmayer/rails,iainbeeston/rails,untidy-hair/rails,koic/rails,MSP-Greg/rails,hanystudy/rails,riseshia/railsguides.kr,yasslab/railsguides.jp,pvalena/rails,baerjam/rails