On Tue, Apr 14, 2009 at 2:19 PM, aidy lewis <[email protected]>wrote:
> Hi, > > #env.rb > class ProjectWorld > include Spec::Matchers > > def browser > @browser ||= Browser.new > end > end > > World do > ProjectWorld.new > end > > Instead of using explicit getters here, can I not use attribute readers? > You can, as long as you initialize @browser in initialize. It would be almost the same (eager instead of lazy instantiation) Aslak > > Aidy > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
