Sunday, May 26, 2013

[Rails] Re: Re: Class design Help!

Hassan Schroeder wrote in post #1110193:
> On Sat, May 25, 2013 at 11:21 PM, oliver bee <lists@ruby-forum.com>

Nice one!

> class Vehicle
> attr_accessor :wheel_count
> end
>
> class Truck < Vehicle
> def initialize(wheel_count = 4)
> @wheel_count = wheel_count
> end
> end
>
> ... and so on.
>
> I'd also recommend 'Practical Object-Oriented Design in Ruby'
> ( http://www.poodr.info/ ) for some good thoughts on this.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9ee24901128ebd99793fc8325452b5d4%40ruby-forum.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate