From: Dave Thomas Date: 2001-10-30T15:15:09+09:00 Subject: [ruby-talk:23809] Re: RubyGems Status (was: Re: Someinspirations from REBOL) Robert Feldt writes: > I like this even though I think there are different > types of "dependencies" so we might want to introduce classes for them, > eg: > > > requires "RyansCoolGem, 0.0.2" > > requires "RobertsCoolGem, 2.0.0" > > would become > > dependency Depends.new("RyansCoolGem", "0.0.2") > dependency Conflicts.new("RobertsCoolGem", "2.0.0", "Name clashes") Agreed. In fact I'd probably want to go slightly further and make versions a Class too: that way we'd have more consistent numbering that simply relying on a String. dependsOn Gem("RyansCoolGem") >= V(0, 0, 2) where V() generates a version number object and Gem returns an object that overrides the relational operators and simply records the fact they were called for later comparison with the Gem's real version number. Dave