Ruby on Rails Saturday, July 11, 2015

On 11 July 2015 at 13:40, Richard Zanabria <lists@ruby-forum.com> wrote:

>
> class Auto
>
> attr_accessor :auto01, :auto02
>
> def initialize(auto01,auto02)
> auto01 = auto01
> @auto02 = auto02

Why does the last line start @ and not the one before?

> end
>
> def calcular_neto
> (auto01 + auto02)*0.18 + auto01 + auto02

Should there any @s in the above?

In future if there is an error please post the error message. Also it
was not necessary to post a multi line comment at the start that was
not of any significance to the question.

Colin

--
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/CAL%3D0gLvRPA_EC8xfrV3EWhqDeFQ_G7zZbM7n41mddwkmj_VB0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment