In this method you set '@wheels=wheels'


You would not normally expect that. Since it's something else that happens, we call that a side effect. 



 
30
+  def self.number_of_wheels(wheels)

 
31
+    @wheel = wheels

 
32
+    return @wheel

 
33
+  end

 
34
+end

On Wed, Apr 9, 2014 at 5:27 PM, PDaily <notifications@github.com> wrote:

>> +    @make = args.fetch(:make) if args[:make]
>> +    @model = args.fetch(:model) if args[:model]
>> +    @year = args.fetch(:year).to_s if args[:year]
>> +  end
>> +##
>> +# Such wheels, so round
>> +# May have been overzealous
>> +#
>> +# Could have done:
>> +# def number_of_wheels
>> +#    4
>> +# end
>> +#
>> +# But wanted to mess with arguments
>> +##
>> +  def self.number_of_wheels(wheels)
> What you have written is much cleaner looking!
> What side effects would what I have written cause?
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/RubyoffRails/Episode6/pull/23/files#r11462390