On Aug 25, 8:12 am, "Logan Capaldo" <logancapa... / gmail.com> wrote:

> Well, I don't know about in general, but for this particular instance
> (and similar ones) you could just do
>
> class X
>   def a; "a"; end
> end
>
> class Y < X
>   def b; "b"; end
>   def public_methods(all = true)
>      self.class.superclass.public_instance_methods(all)
>   end
> end

Yep. I was hoping to avoid that if possible. It will a chore to makes
sure I cover all the ones that matter, and that I've emulated
properly.

> Incidently, you do realize that the whole mess of
> self.class.superclass.instance_method(:public_methods).call(all) is
> exactly equivalent to super right? At least in the context of
> overriding public_methods anyway. And of course def foo(); super; end
> is the same as not writing foo at all, so it's not surprising you get
> the same result.

Sure. That was just the "opposite" example of what I was trying to do.
Ie. rather than binding a super method to the current context, I'm
trying to bind a method "as if" to a super context.

Also, I realized that delegation is out of the question for what I'm
trying to do. So I will have to deal with this issue in some fashion.

Thanks,
T.