[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

DelegateClass vs. Extending

Brian Mr.

3/15/2007 2:13:00 PM

I was looking at DelegateClass example:

class Tempfile < DelegateClass(File)
# constant and class member data initialization...

def initialize(basename, tmpdir=Dir::tmpdir)
# build up file path/name in var tmpname...

@tmpfile = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL,
0600)

# ...

super(@tmpfile)

# below this point, all methods of File are supported...
end

# ...
end

and was wondering what is the advantage of doing this and not just
extending the File class? Thanks.

--
Posted via http://www.ruby-....

4 Answers

Alan Ferris

2/6/2011 11:57:00 AM

0

On Sat, 5 Feb 2011 10:21:24 -0500, "Patrick" <barker_pb@erinot.com>
wrote:

>"Alan Ferris" <hairy.ferrit@yahoo.co.uk> wrote
>> Why would I want or need to scrounge of the state to live?
>
>Goes with the territory:
>there were three areas across the UK where more than three out of every ten
>households had no one in work. These were:
> a.. Liverpool (32.1 per cent)
>
> b.. Nottingham (31.3 per cent)
>
> c.. Glasgow City (31.0 per cent)

So what?

>Over the same period for the UK as a whole, 18.7 per cent of households had
>no one in work. There were large variations across the country with the
>lowest percentages in:
> a.. Surrey (10.9 per cent)
>
> b.. Inverness and Nairn and Moray, Badenoch and Strathspey (11.0 per
>cent).


It is funny watching you dance to try and defend the fact you scrounge
of the state, friends and family. You would think eating less would
do you good:
http://www.facebook.com/profile.php?id=...

But no, you demand that people feed your fat face and sit around on
your lard ass looking for others like you to support your position.

But then you need not look far. Ohio has the third highest people on
welfare in the states. So you only need pop round to the neighbours
to find a fellow scrounger.
http://www.daytondailynews.com/news/ohio-news/ohio-welfare-highest-in-a-decade-10...

--
Ferrit

()'.'.'()
( (T) )
( ) . ( )
(")_(")

Patrick

2/6/2011 7:13:00 PM

0

"Alan Ferris" <hairy.ferrit@yahoo.co.uk> wrote ...
> "Patrick" <barker_pb@erinot.com>> wrote:
>>"Alan Ferris" <hairy.ferrit@yahoo.co.uk> wrote
>>> Why would I want or need to scrounge of the state to live?
>>
>>Goes with the territory:
>>there were three areas across the UK where more than three out of every
>>ten
>>households had no one in work. These were:
>> a.. Liverpool (32.1 per cent)
>>
>> b.. Nottingham (31.3 per cent)
>>
>> c.. Glasgow City (31.0 per cent)
>
> So what?

So.... you scrounge off the gubt.



Mike Smith

2/7/2011 12:03:00 PM

0

On Fri, 04 Feb 2011 17:59:31 -0600, Mike Smith <mws@wt.net> wrote:

>On Fri, 4 Feb 2011 14:45:35 -0800 (PST), Lost In Space
><smappersmapper@yahoo.com> wrote:
>
>>On Feb 4, 3:23?pm, "Patrick" <barker...@erinot.com> wrote:
>>>
>>> What has he fixed lately?
>>
>> Dow is up past 12000, S&P 1400 .. Jobless rates falling , home
>>foreclosures slowing .
>
>Explain, precisely, how he has done any of those 4 items.
>
>Mike Smith

{tap... tap... tap... tap... tap...}

How long is this going to take?

{tap... tap... tap... tap... tap...}

Mike Smith

Ala

2/9/2011 3:25:00 AM

0


"Alan Ferris" <hairy.ferrit@yahoo.co.uk> wrote in message
news:td7qk6p4hueu7m8t009abebj15c4n8jdvn@4ax.com...
> On Fri, 4 Feb 2011 21:05:42 -0500, "Patrick" <barker_pb@erinot.com>
> wrote:
>
>>(Overall, 47% of voters say they at least somewhat approve of the
>>president's performance. Fifty-one percent (51%) disapprove.
>>
>>The Rasmussen Reports daily Presidential Tracking Poll for Friday shows
>>that 25% of the nation's voters Strongly Approve of the way that Barack
>>Obama is performing his role as president. Thirty-eight percent (38%)
>>Strongly Disapprove, giving Obama a Presidential Approval Index rating
>>of -13)
>
> I love statistics, you can prove anything with them:
>
> "Who offered the best State of the Union plan for the economy?" --
> broke down as follows:
>
> Pres. Obama and Democrats -- 42 percent
> U.S. Rep Paul Ryan and Republicans -- 27 percent
> U.S. Rep Michele Bachmann and Tea Party -- 25 percent
> Other -- 4 percent
>
> Los Angeles Business from bizjournals
> Date: Friday, February 4, 2011, 1:12pm PST
>
>
>
http://www.maggiesnotebook.com/2010/12/democrats-want-no-part-of-paul-ryans-mandatory-spendin...
Democrats Want No Part of Paul Ryan's Mandatory Spending Ceiling
December 30, 2010
By Maggie 4 comments so far
Since everyone agrees cutting spending is the first mission of both parties
(yeah, right), we might think House Democrats would embrace the House Budget
Committee Chairman-elect, Paul Ryan, setting a spending ceiling that cannot
be breached, and will not be subject to a vote on the floor. At least we
would have a budget, which the 111th Congress failed to provide. But they
want no part of a mandatory spending ceiling. Instead, they accuse
Republicans of "a lack of transparency," and being "arrogant." See Paul Ryan
at work in the video below, with Congresswoman Debbie Wasserman-Schultz.

Rep. Paul Ryan

From The Hill:

Republicans argue allowing the Budget chairman to set spending ceilings is
necessary because of the failure of the last Congress to approve a budget
last year.

"This provision is only necessary because of Democrats' historic failure
to pass a budget last year. They have nothing but their own ineptitude to
blame for this temporary authority," Brendan Buck, a spokesman for the House
Republican transition, said in response to the Van Hollen statement.

Another House aide argued the powers are not unprecedented. The GOP gave
the chairman of the House similar powers in the opening days of the 1999
Congress, when the GOP also controlled the chamber.

The rule change is set for a vote soon after January 5th, 2011.


http://www.maggiesnotebook.com/2010/12/democrats-want-no-part-of-paul-ryans-mandatory-spendin...