[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Mixins and variables

James Gray

12/7/2005 2:31:00 PM

On Dec 6, 2005, at 11:06 PM, Johannes Friestad wrote:

> Hi,
> I'm new to Ruby, and trying to figure out how the inheritance/mixin
> works:
> I can't figure out how to set an instance variable with a mixin method
> from the object's initialize().

I see you have your answer, so let me just make some general comments:

> Example:
> -----------------
> module TestMod
> def x
> @x
> end
> def x=(arg)
> @x=arg
> end

You can replace the last six lines with:

attr_accessor :x

> end
>
> class TestClass
> include TestMod
> def initialize
> x=('alpha')

self.x = 'alpha' # as discussed, or just @x = 'alpha'

> printf("x=%s\n", x)

And we would usually write that as:

puts "x=#{x}"

> end
> end

Hope that gives you an idea or two.

James Edward Gray II



45 Answers

Bill Walker

6/22/2007 3:05:00 PM

0


"Sanders Kaufman" <bucky@kaufman.net> wrote in message
news:sGQei.3268$Rw1.717@newssvr25.news.prodigy.net...
> Bill Walker wrote:
>
>> Just another example of that corrupt son of a bitch thinking he is above
>> the laws and Constitution.. When the time comes, he'll sink George Bush
>> like a rock in the middle of a lake..
>
> From your keyboard to God's monitor, may it come to pass.
>
> *Something* very interesting is happening in the WH this week - and I'm
> not sure what the big picture is.
>
> At the same time that Cheney says he's not part of the executive branch,
> Bush *angrily* cancelled an important meeting about Gitmo when he found
> out that one of his insiders was talking to the press about it.

To anyone paying attention.. things seem to be unravelling all over the
place..
Past performance and experience with all this, causes me to be leary of any
of it.. The public performances of the bunch seem to indicate they are all
jumping Bush/Cheney's ship, but their votes where it counts contradicts what
they say..

The ones we elected to balance the scales don't have the mustard to do what
we elected them to do.. Only a handful have actually taken the initiative,
the
rest are only paying lip service to get elected one more time.. Disgusting..

Bill Walker
Irving, Tx.


Don Homuth

6/22/2007 3:20:00 PM

0

On Fri, 22 Jun 2007 15:05:08 GMT, "Bill Walker"
<bill.walker2@verizon.net> wrote:

>
>"Sanders Kaufman" <bucky@kaufman.net> wrote in message
>news:sGQei.3268$Rw1.717@newssvr25.news.prodigy.net...
>> Bill Walker wrote:
>>
>>> Just another example of that corrupt son of a bitch thinking he is above
>>> the laws and Constitution.. When the time comes, he'll sink George Bush
>>> like a rock in the middle of a lake..
>>
>> From your keyboard to God's monitor, may it come to pass.
>>
>> *Something* very interesting is happening in the WH this week - and I'm
>> not sure what the big picture is.
>>
>> At the same time that Cheney says he's not part of the executive branch,
>> Bush *angrily* cancelled an important meeting about Gitmo when he found
>> out that one of his insiders was talking to the press about it.
>
>To anyone paying attention.. things seem to be unravelling all over the
>place..

Nah -- those who are paying attention are the ones who were just 18
months or so ago predicting, mind you, the permanent and utter demise
of The Left in favor of the permanent majoritarian status of The
Right.

Since we Know beyond peradventure that The Right is always right, then
things cannot be unravveling, can they? It's just a strategic hiatus
in the Great Plan, idnit?

>Past performance and experience with all this, causes me to be leary of any
>of it..

That's always the best stance, overall.

>The public performances of the bunch seem to indicate they are alljumping Cheney's ship,

Before one jumps, best to have another ship close by.

> but their votes where it counts contradicts what
>they say..

You expected differently, somehow?

>The ones we elected to balance the scales don't have the mustard to do what
>we elected them to do..

A narrow majority cannot run roughshod over public policy formulation,
especially when faced with the un-overridable Veto threat.

Change comes slowly, as it ought, and as the FFs intended.

> Only a handful have actually taken the initiative,

Only a handful Ever take the inititiative incongruous.

>the rest are only paying lip service to get elected one more time..

Being elected is better than being defeated. It means you get to
remain in the game and not abandon the field to the other side.

> Disgusting..

Hardly. The slim D majorities in both the Senate and the House simply
don't have the votes to inflict their preferences across the board.
The expectations game now being played by the Wingnut set -- that
somehow the Ds ought to be able to enact everything in their agenda --
is nonsense in any reasonable sense.

So long as Dubya hold the veto, and it cannot be overridden, then it's
unrealistic to Demand of the Ds that some new overriding set of
policies be enacted through legislation.

A slim majority with a president of the same party Can enact public
policies without the threat of a veto. But a slim majority with a
president of the opposition cannot. Remember how the Contract On
America had such a difficult time when the Rs had a majority but a
president from the Ds?

That's how it works and is supposed to work.

It was established to be that way from the inception of the republic,
and it ought neither to surprise nor to bother anyone when it works
out that way.

That's why we have Elections -- to change such things, and as a rule
the change comes gradually, not all at once.

Bill Walker

6/22/2007 3:54:00 PM

0


"Don Homuth" <dhomuthoneatcomcast.net> wrote in message
news:mlpn73h7mb7fft8a6qkcdt6c2or30ivsrb@4ax.com...
> On Fri, 22 Jun 2007 15:05:08 GMT, "Bill Walker"
> <bill.walker2@verizon.net> wrote:
>
>>
>>"Sanders Kaufman" <bucky@kaufman.net> wrote in message
>>news:sGQei.3268$Rw1.717@newssvr25.news.prodigy.net...
>>> Bill Walker wrote:
>>>
>>>> Just another example of that corrupt son of a bitch thinking he is
>>>> above
>>>> the laws and Constitution.. When the time comes, he'll sink George Bush
>>>> like a rock in the middle of a lake..
>>>
>>> From your keyboard to God's monitor, may it come to pass.
>>>
>>> *Something* very interesting is happening in the WH this week - and I'm
>>> not sure what the big picture is.
>>>
>>> At the same time that Cheney says he's not part of the executive branch,
>>> Bush *angrily* cancelled an important meeting about Gitmo when he found
>>> out that one of his insiders was talking to the press about it.
>>
>>To anyone paying attention.. things seem to be unravelling all over the
>>place..
>
> Nah -- those who are paying attention are the ones who were just 18
> months or so ago predicting, mind you, the permanent and utter demise
> of The Left in favor of the permanent majoritarian status of The
> Right.
>
> Since we Know beyond peradventure that The Right is always right, then
> things cannot be unravveling, can they? It's just a strategic hiatus
> in the Great Plan, idnit?
>
>>Past performance and experience with all this, causes me to be leary of
>>any
>>of it..
>
> That's always the best stance, overall.
>
>>The public performances of the bunch seem to indicate they are alljumping
>>Cheney's ship,
>
> Before one jumps, best to have another ship close by.
>
>> but their votes where it counts contradicts what
>>they say..
>
> You expected differently, somehow?
>
>>The ones we elected to balance the scales don't have the mustard to do
>>what
>>we elected them to do..
>
> A narrow majority cannot run roughshod over public policy formulation,
> especially when faced with the un-overridable Veto threat.
>
> Change comes slowly, as it ought, and as the FFs intended.
>
>> Only a handful have actually taken the initiative,
>
> Only a handful Ever take the inititiative incongruous.
>
>>the rest are only paying lip service to get elected one more time..
>
> Being elected is better than being defeated. It means you get to
> remain in the game and not abandon the field to the other side.
>
>> Disgusting..
>
> Hardly. The slim D majorities in both the Senate and the House simply
> don't have the votes to inflict their preferences across the board.
> The expectations game now being played by the Wingnut set -- that
> somehow the Ds ought to be able to enact everything in their agenda --
> is nonsense in any reasonable sense.
>
> So long as Dubya hold the veto, and it cannot be overridden, then it's
> unrealistic to Demand of the Ds that some new overriding set of
> policies be enacted through legislation.
>
> A slim majority with a president of the same party Can enact public
> policies without the threat of a veto. But a slim majority with a
> president of the opposition cannot. Remember how the Contract On
> America had such a difficult time when the Rs had a majority but a
> president from the Ds?
>
> That's how it works and is supposed to work.
>
> It was established to be that way from the inception of the republic,
> and it ought neither to surprise nor to bother anyone when it works
> out that way.
>
> That's why we have Elections -- to change such things, and as a rule
> the change comes gradually, not all at once.

Of course I agree with you, for the most part.. We did elect these
leaders to lead and make sure the message is loud and clear to
this administration.. So far.. that message has been muted and in
some cases silent.. The leadership that we sent to Washington are
not leading as we elected them to do..

Change needs to be a gradual process, that's true enough in normal
times .. These are not normal times and the changes that are needed
are crucial to America.. Only a very few of our leaders are demonstrat-
ing the leadership to do that.. The ones who could make the differ-
ence are chosing to either sit on the sidelines or actually oppose any
meaningful debate..

Bill Walker
Irving, Tx.


Sanders Kaufman [MCSD]

6/22/2007 4:22:00 PM

0

Bill Walker wrote:

> Of course I agree with you, for the most part.. We did elect these
> leaders to lead and make sure the message is loud and clear to
> this administration.

Not me. I never had any confidence one way or the other as to how these
freshman legislators would work out. It wasn't even an issue for me.

These current elections are all about purging the system of the
Televangelicals and NeoConservatives.


> Change needs to be a gradual process, that's true enough in normal
> times .. These are not normal times and the changes that are needed
> are crucial to America.. Only a very few of our leaders are demonstrat-
> ing the leadership to do that.. The ones who could make the differ-
> ence are chosing to either sit on the sidelines or actually oppose any
> meaningful debate..


Like I always say - you can't turn the ship of state on a dime. It'll
capsize.

opticon

6/22/2007 4:31:00 PM

0

Sanders Kaufman wrote:

> *Something* very interesting is happening in the WH this week - and I'm
> not sure what the big picture is.
>
From: "Lets Roll" <letsr...@meet-me-in-hell.com>
Newsgroups:
alt.politics.immigration,tx.politics,misc.survivalism,or.politics,alt.fan.rush-limbaugh
References: <kav0c1htj4nl8pr5o3klrfp57h600df3ha@4ax.com>
<3ic3hrFksk87U1@individual.net>
<G77we.492$U61.32@newssvr11.news.prodigy.com>
<2572c11jlbh64ijg3fh5mdpsct38cmcvrr@4ax.com>
<bXbwe.490$Ox3.277@newssvr12.news.prodigy.com>
Subject: Re: Texas REPUBLICAN Senator Tells Minutemen: Back Off
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Message-ID: <sRcwe.10648$hK3.9992@newsread3.news.pas.earthlink.net>
Date: Tue, 28 Jun 2005 14:08:24 GMT
NNTP-Posting-Host: 4.253.85.158
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread3.news.pas.earthlink.net 1119967704 4.253.85.158 (Tue,
28 Jun 2005 07:08:24 PDT)
NNTP-Posting-Date: Tue, 28 Jun 2005 07:08:24 PDT
Organization: EarthLink Inc. -- http://www.Ear...


"Sanders Kaufman" <N...@kaufman.net> wrote in message
news:bXbwe.490$Ox3.277@newssvr12.news.prodigy.com...
> "Gunner" <gun...@lightspeed.net> wrote in message
> news:2572c11jlbh64ijg3fh5mdpsct38cmcvrr@4ax.com...
>> On Tue, 28 Jun 2005 07:38:18 GMT, "Sanders Kaufman"
>
>>>> Mine the crap out of the land between the fences.
>>>> Problem solved.
>>>> Now mexico can feed their own rabble.
>>>> How tough would this be ?
>>>
>>>Real tough- since you keep voting yourselves tax cuts.
>>>That shit don't come free.
>>>
>> By not having to pay for hundreds of thousands of babies born in US
>> hospitals by illegal mothers ..we can afford LOTs and lots of mines,
>> toe poppers and concertina.
>
> Go for it deude.
> Let me know how that works out for ya.
> Oh wait - what you want doesn't matter, it's out of your power.
> Nobody has to die... because you're impotent.
> Too bad, so sad.
>

Hey, Bucky. You're selling yourself cheap.
$250 a month and stacked 64 deep to a room is the going rate for mojado
roommates.

I have one bedroom of a 3BR house to rent out to a roommate.
DSL
Shared Kitchen Privileges
$100 per week ($400 Refundable Security Deposit)
Paid Utilities - Water, Electric, Gas, Local Phone
Large Backyard
Curbside Parking
One Room is Furnished
No dogs or Republicans
11449 Lippitt Ave.
Dallas, TX 75218-2023
+1 (214) 321-2395
SandersKauf...@Hotmail.com
http://www.kaufman.net/bucky...

opticon

6/22/2007 4:31:00 PM

0

Bill Walker wrote:

> Of course I agree with you, for the most part..

Hey now lil' sissy... You won't even post under anything but an alias....
Anonymous assholes like you sure got some gall, asking for an address...
Here's mine, though..

Bill Walker
2025 Tejas Trail
Irving, Tx. 75060


Now.. got the balls to publish yours, or is the chicken shit still running
out of your anonymous ears... LOL


Don Homuth

6/22/2007 9:07:00 PM

0

On Fri, 22 Jun 2007 15:54:18 GMT, "Bill Walker"
<bill.walker2@verizon.net> wrote:

>
>"Don Homuth" <dhomuthoneatcomcast.net> wrote in message
>news:mlpn73h7mb7fft8a6qkcdt6c2or30ivsrb@4ax.com...

>> So long as Dubya hold the veto, and it cannot be overridden, then it's
>> unrealistic to Demand of the Ds that some new overriding set of
>> policies be enacted through legislation.
>>
>> A slim majority with a president of the same party Can enact public
>> policies without the threat of a veto. But a slim majority with a
>> president of the opposition cannot. Remember how the Contract On
>> America had such a difficult time when the Rs had a majority but a
>> president from the Ds?
>>
>> That's how it works and is supposed to work.
>>
>> It was established to be that way from the inception of the republic,
>> and it ought neither to surprise nor to bother anyone when it works
>> out that way.
>>
>> That's why we have Elections -- to change such things, and as a rule
>> the change comes gradually, not all at once.
>
>Of course I agree with you, for the most part.. We did elect these
>leaders to lead and make sure the message is loud and clear to
>this administration.. So far.. that message has been muted and in
>some cases silent..

The message has come through loud and clear. It's just Very difficult
to back it up with actual legislation. Having The Votes is what's
required, and for the time being, the Ds don't.

>The leadership that we sent to Washington are
>not leading as we elected them to do..

Oh, I dunno. Thus far, given their slim majority, they're coming
right along, seems as how.

Did you expect that the Ds could ride roughshod over the entire
congress And the executive branch? Do be somewhat realistic here --
that was Never going to be possible.

>Change needs to be a gradual process, that's true enough in normal
>times .. These are not normal times and the changes that are needed
>are crucial to America..

Nah - these are normal times. The Republic is not in imminent
jeopardy -- at least thus far. Gradual change was built into the
Constitution from its inception, and gradual change is Far better than
rapid revolutionary change, certainly.

> Only a very few of our leaders are demonstrat-
>ing the leadership to do that.. The ones who could make the differ-
>ence are chosing to either sit on the sidelines or actually oppose any
>meaningful debate..

Dunno what frequencies you're monitoring, but switch bands. There's
all Sorts of Meaningful Debate going on out there.

Baxter

6/22/2007 9:33:00 PM

0

-
------------------------------------------------------------------------------------
Free Software - Baxter Codeworks www.baxcode.com
------------------------------------------------------------------------------------

"Don Homuth" <dhomuthoneatcomcast.net> wrote in message
news:mlpn73h7mb7fft8a6qkcdt6c2or30ivsrb@4ax.com...
>
> Hardly. The slim D majorities in both the Senate and the House simply
> don't have the votes to inflict their preferences across the board.
> The expectations game now being played by the Wingnut set -- that
> somehow the Ds ought to be able to enact everything in their agenda --
> is nonsense in any reasonable sense.
>
> So long as Dubya hold the veto, and it cannot be overridden, then it's
> unrealistic to Demand of the Ds that some new overriding set of
> policies be enacted through legislation.
>
> A slim majority with a president of the same party Can enact public
> policies without the threat of a veto. But a slim majority with a
> president of the opposition cannot. Remember how the Contract On
> America had such a difficult time when the Rs had a majority but a
> president from the Ds?
>

OTOH, it IS up to the Congress to fund the war/occupation - or NOT. Bush
has no veto if Congress says it won't fund his misadventure/quagmire.

Save Our Troops! Bring Them Home.


Gatt

6/22/2007 9:49:00 PM

0


"Don Homuth" <dhomuthoneatcomcast.net> wrote in message
news:mlpn73h7mb7fft8a6qkcdt6c2or30ivsrb@4ax.com...

>>To anyone paying attention.. things seem to be unravelling all over the
>>place..
>
> Nah -- those who are paying attention are the ones who were just 18
> months or so ago predicting, mind you, the permanent and utter demise
> of The Left in favor of the permanent majoritarian status of The
> Right.

Here's one Spread Eagle posted on September 18 last year:

"And, by the by, which means that normal folks are afraid of them, will
never vote for them, and so like a dog chasing its tail, they are
destined to lose again. The freakshows just don't get it.

Here's one by NoNoBadDog on 10/5/2006 in response to "Thirty-three days
until the Liberation:"

"Current polling put the Republicans ahead. Can we assume from the heading
of yoru propaganda that you'll shut up in 31
days?"

..-c


Ockham's Razor

6/22/2007 11:34:00 PM

0

In article <v8eo739912sitvuh12qj8c8fj8mmedoe2u@4ax.com>,
Don Homuth <dhomuthoneatcomcast.net> wrote:

> On Fri, 22 Jun 2007 15:54:18 GMT, "Bill Walker"

> >Change needs to be a gradual process, that's true enough in normal
> >times .. These are not normal times and the changes that are needed
> >are crucial to America..
>
> Nah - these are normal times. The Republic is not in imminent
> jeopardy -- at least thus far. Gradual change was built into the
> Constitution from its inception, and gradual change is Far better than
> rapid revolutionary change, certainly.

It will take the next president her first afternoon to reverse all the
executive orders of the Bushies, and about one week to erase all the
"signing statements" by the shrub.

If the Congress is astute, it will then take about four weeks to
overcome all the stupid veto's.

Then two weeks to start getting all the troops out of Iraq.

With any luck, two months into the next administration they can start
working on the obscene tax breaks for the rich and the corporations.

--
"When fascism comes to America, it will be wrapped in the flag and
carrying a cross."
Sinclair Lewis