Please forgive my laziness, because I’m certain this is in Pickaxe,
Why’s Poignant Guide, Ruby In A Nutshell, “The Ruby Way,” and a dozen
other resources as well, most of which are either a bookshelf away or
a Google away, but if anybody wants to just humor me, what’s the best
way to simplify this heinous, Java-esque code? Can I throw it in a
Struct and then just extend initialize without losing any of the stuff
Struct provides?

attr :channel, true@channel = channel
a Google away, but if anybody wants to just humor me, what’s the best
way to simplify this heinous, Java-esque code? Can I throw it in a
Struct and then just extend initialize without losing any of the stuff
Struct provides?

is “*a” basically a keyword args flag that tells initialize() to take
any and all args and just pass them up the chain to super()?

Except that it isn’t keyword args. I like David Black’s name for it:
the (un)array operator. It’s an unary non-overridable operator on
arrays. When used on an array as a receiver, it indicates that it will
take a list of items and treat them as an array; when used on a sender
array, it splits that array out into a list:

What is this supposed to do? It doesn’t seem to allow me to create a
Sample object and pass parameters to new. I think the OP wanted that.

–
R. Mark V.
Object Computing, Inc.

oops sorry. Whenever I answer questions like this, half the time I
think the questioner is asking to be reminded of the idiom (because
that’s what usually happens to me), and I tend to leave stuff out.

is “*a” basically a keyword args flag that tells initialize() to take
any and all args and just pass them up the chain to super()?
Except that it isn’t keyword args. I like David Black’s name for it:
the (un)array operator.
I might have been thinking of a Python term…

You might have been. I believe that Python supports both *args and
**args, but I could be wrong. (**args is the keyword args flag.)

so when you feed it to initialize() like that, it translates the list
it’s been given into an array and then initialize() picks that up and
says “oh, ok, this is the sequence of args I’m expecting”?