The @klass variable also could == some_object.class
If this is the case, then it could be a class method call, but still
don't see the necessity to use #send.
--
Thanks, Ivan Povalyukhin


On Jan 27, 6:39 pm, Marnen Laibow-Koser <li...@ruby-forum.com> wrote:
> David Kahn wrote in post #978011:
>
> > On Thu, Jan 27, 2011 at 4:01 PM, William Fisk
> > <william.f...@gmail.com>wrote:
>
> >> Ah, thanks, yes that will probably be the reason.
>
> > Right... send comes in real handy in testing private methods, use it all
> > the
> > time
>
> Then you've got bigger problems.  You shouldn't be testing your private
> methods; that's poking too deeply into an object's implementation.  You
> should only ever test things that can be called from outside an object.
>
> If a private method is an intermediate value in a computation, just test
> the end result.  If a private method really needs to be tested
> separately, then it's telling you that it wants to be public.
>
> Best,
> -- 
> Marnen Laibow-Koserhttp://www.marnen.org
> mar...@marnen.org
>
> Sent from my iPhone
>
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to