[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

[ANN] Updateable 0.0.3

John W. Long

5/4/2005 3:57:00 AM

This is the first public release of a very, very small project I've been
developed at work. I call it Updateable. By mixing in the Updateable
module into a class you can easily update the attributes of the class
with a hash:

require 'updateable'

class TestObject
include Updateable

attr_accessor :a, :b, :c

def initialize(options = {})
update(options)
end
end

o = TestObject.new(:a => 1, :b => 2, :c => 3)
puts "#{o.a}#{o.b}#{o.c}" #=> '123'

o.update(:a => 'a', :b => 'b', :c => 'c')
puts "#{o.a}#{o.b}#{o.c}" #=> 'abc'

Download:
http://johnwlong.com/downloads/iblp-mixins-0.0.3/lib/upd...

Tests:
http://johnwlong.com/downloads/iblp-mixins-0.0.3/test/unit/updateab...

Updateable is currently part of another small project which can be
downloaded here:

http://johnwlong.com/downloads/iblp-mixins...

--
John Long
http://wiseheart...



8 Answers

Francis Hwang

5/8/2005 2:55:00 PM

0

Interesting. Is there a particular kind of use that inspired you to
write this module? Or is it just that you'd rather condense four lines
of attribute assignment into one?

On May 3, 2005, at 11:56 PM, John W. Long wrote:

> This is the first public release of a very, very small project I've
> been developed at work. I call it Updateable. By mixing in the
> Updateable module into a class you can easily update the attributes of
> the class with a hash:
>
> require 'updateable'
>
> class TestObject
> include Updateable
>
> attr_accessor :a, :b, :c
>
> def initialize(options = {})
> update(options)
> end
> end
>
> o = TestObject.new(:a => 1, :b => 2, :c => 3)
> puts "#{o.a}#{o.b}#{o.c}" #=> '123'
>
> o.update(:a => 'a', :b => 'b', :c => 'c')
> puts "#{o.a}#{o.b}#{o.c}" #=> 'abc'
>
> Download:
> http://johnwlong.com/downloads/iblp-mixins-0.0.3/lib/upd...
>
> Tests:
> http://johnwlong.com/downloads/iblp-mixins-0.0.3/...
> updateable_test.rb
>
> Updateable is currently part of another small project which can be
> downloaded here:
>
> http://johnwlong.com/downloads/iblp-mixins...
>
> --
> John Long
> http://wiseheart...
>
>
>

Francis Hwang
http://f...



Espanuelo

9/16/2010 6:22:00 PM

0

Ramon F Herrera wrote:
> Every Hispanic that migrates to Europe is one less Hispanic that
> migrates to the US. It is a valve that relieves the press

Axiome false on the valve.
Population pressure increases in both systems (First World and Third World).
If they migrate 100 from the Third World to First World, immediately
(15 years) the Third World will have already recovered 150.

The emigration has to be from First World to Third World.

It is difficult to persuade people down steps.

>
> Fact is, countries will be competing for the most precious resource:
> people.
>
> -Ramon

Ramon F Herrera

9/16/2010 7:32:00 PM

0

On Sep 16, 1:21 pm, Españuelo <espanu...@senseterra.com> wrote:
> Ramon F Herrera wrote:
> > Every Hispanic that migrates to Europe is one less Hispanic that
> > migrates to the US. It is a valve that relieves the press
>
> Axiome false on the valve.
> Population pressure increases in both systems (First World and Third World).
>   If they migrate 100 from the Third World to First World, immediately
> (15 years) the Third World will have already recovered 150.
>
> The emigration has to be from First World to Third World.
>
> It is difficult to persuade people down steps.
>
>
>
> > Fact is, countries will be competing for the most precious resource:
> > people.
>
> > -Ramon
>
>

There is no population pressure anymore. You better look for other
excuses.

-Ramon

f. barnes

9/16/2010 8:02:00 PM

0

On Sep 16, 2:31 pm, Ramon F Herrera <ra...@conexus.net> wrote:
> On Sep 16, 1:21 pm, Españuelo <espanu...@senseterra.com> wrote:
>
>
>
>
>
> > Ramon F Herrera wrote:
> > > Every Hispanic that migrates to Europe is one less Hispanic that
> > > migrates to the US. It is a valve that relieves the press
>
> > Axiome false on the valve.
> > Population pressure increases in both systems (First World and Third World).
> >   If they migrate 100 from the Third World to First World, immediately
> > (15 years) the Third World will have already recovered 150.
>
> > The emigration has to be from First World to Third World.
>
> > It is difficult to persuade people down steps.
>
> > > Fact is, countries will be competing for the most precious resource:
> > > people.
>
> > > -Ramon
>
> There is no population pressure anymore. You better look for other
> excuses.
>
> -Ramon-

Yep, in Hispanic countries of the Americas all their brown,
illiterate, fast breeders have been encouraged by their nation's
wealthy, mostly white, elites to deport themselves, primarily to the
US. So the birth rate in those countries has decreased.

Hide quoted text -
>
> - Show quoted text -

Ramon F Herrera

9/16/2010 8:47:00 PM

0

On Sep 16, 3:01 pm, "f. barnes" <fre...@centurytel.net> wrote:
> On Sep 16, 2:31 pm, Ramon F Herrera <ra...@conexus.net> wrote:
>
>
>
> > On Sep 16, 1:21 pm, Españuelo <espanu...@senseterra.com> wrote:
>
> > > Ramon F Herrera wrote:
> > > > Every Hispanic that migrates to Europe is one less Hispanic that
> > > > migrates to the US. It is a valve that relieves the press
>
> > > Axiome false on the valve.
> > > Population pressure increases in both systems (First World and Third World).
> > >   If they migrate 100 from the Third World to First World, immediately
> > > (15 years) the Third World will have already recovered 150.
>
> > > The emigration has to be from First World to Third World.
>
> > > It is difficult to persuade people down steps.
>
> > > > Fact is, countries will be competing for the most precious resource:
> > > > people.
>
> > > > -Ramon
>
> > There is no population pressure anymore. You better look for other
> > excuses.
>
> > -Ramon-
>
> Yep, in Hispanic countries of the Americas all their brown,
> illiterate, fast breeders have been encouraged by their nation's
> wealthy, mostly white, elites to deport themselves, primarily to the
> US.  So the birth rate in those countries has decreased.
>
>  Hide quoted text -
>
>
>
> > - Show quoted text -
>
>

Latin America has more than 500 million inhabitants. The number of
children borne by 12 million here is inconsequential.

Birth rates are down. Everywhere. Look for a different excuse.

-Ramon

f. barnes

9/16/2010 11:32:00 PM

0

On Sep 16, 3:47 pm, Ramon F Herrera <gopos...@jonjay.com> wrote:
> On Sep 16, 3:01 pm, "f. barnes" <fre...@centurytel.net> wrote:
>
>
>
>
>
> > On Sep 16, 2:31 pm, Ramon F Herrera <ra...@conexus.net> wrote:
>
> > > On Sep 16, 1:21 pm, Españuelo <espanu...@senseterra.com> wrote:
>
> > > > Ramon F Herrera wrote:
> > > > > Every Hispanic that migrates to Europe is one less Hispanic that
> > > > > migrates to the US. It is a valve that relieves the press
>
> > > > Axiome false on the valve.
> > > > Population pressure increases in both systems (First World and Third World).
> > > >   If they migrate 100 from the Third World to First World, immediately
> > > > (15 years) the Third World will have already recovered 150.
>
> > > > The emigration has to be from First World to Third World.
>
> > > > It is difficult to persuade people down steps.
>
> > > > > Fact is, countries will be competing for the most precious resource:
> > > > > people.
>
> > > > > -Ramon
>
> > > There is no population pressure anymore. You better look for other
> > > excuses.
>
> > > -Ramon-
>
> > Yep, in Hispanic countries of the Americas all their brown,
> > illiterate, fast breeders have been encouraged by their nation's
> > wealthy, mostly white, elites to deport themselves, primarily to the
> > US.  So the birth rate in those countries has decreased.
>
> >  Hide quoted text -
>
> > > - Show quoted text -
>
> Latin America has more than 500 million inhabitants. The number of
> children borne by 12 million here is inconsequential.
>
> Birth rates are down. Everywhere. Look for a different excuse.
>
> -Ramon-

Perhaps in some countries, but most are from Mexico. And you have to
consider their children and their children's children and so on. The
population increase is not inconsequential.

And if birth rates are down everywhere then some countries must have
been through the roof before. Here's a list by country.

http://en.wikipedia.org/wiki/List_of_sovereign_states_and_dependent_territories_by_fert...


Hide quoted text -
>
> - Show quoted text -

James Of Tucson

9/17/2010 2:25:00 PM

0

On Sep 16, 4:32 pm, "f. barnes" <fre...@centurytel.net> wrote:

> Perhaps in some countries, but most are from Mexico.  And you have to
> consider their children and their children's children and so on.  The
> population increase is not inconsequential.

So, it's children and grandchildren you're opposed to? Or do you only
oppose children and grandchildren of a specific race?

f. barnes

9/17/2010 4:45:00 PM

0

On Sep 17, 9:24 am, James Of Tucson <james0tuc...@gmail.com> wrote:
> On Sep 16, 4:32 pm, "f. barnes" <fre...@centurytel.net> wrote:
>
> > Perhaps in some countries, but most are from Mexico.  And you have to
> > consider their children and their children's children and so on.  The
> > population increase is not inconsequential.
>
> So, it's children and grandchildren you're opposed to?  Or do you only
> oppose children and grandchildren of a specific race?

Actually it's just second grand nephews on the mother's side. WTF?