1 Nov 2005 01:22
Re: USB device
soxinbox <faker <at> yahoo.com>
2005-11-01 00:22:11 GMT
2005-11-01 00:22:11 GMT
rubyScript2exe rocks. Thanks to whoever wrote it. "Rene Davila" <rene.davila <at> gmail.com> wrote in message news:e627b75a0510310941r383ddb64x <at> mail.gmail.com... Thank you so much, it's what I need, even better that the solution I was thinking 2005/10/31, Kevin Brown <blargity <at> gmail.com>: > > On Monday 31 October 2005 11:05, Rene Davila wrote: > > Hi, I would like to know how I can reduce de size of the Ruby > distribution. > > This is because I want to make a aplication that run from a USB memory > and > > I don't want to drag all the ruby distrubution. I'm asking if there are > > some files in the Ruby distribution that I can erase and keeping the > basic > > function of ruby. > > > > -- > > Rene Y. Davila Barrios > > If you're just looking to distribute a single ruby application, then > Ruby2Exe > will package up only what is needed to run the application, including a > ruby > executable. That might be what you're looking for. > >(Continue reading)
>
> -Harold
>
> #Code Follows:
>
> class Numeric
> # Rounds to the specified number of decimal places, returning a string
> value.
> #
> # (1.234).round_to(2) => '1.23'
> # (-1.234).round_to(2) => '-1.23'
> # (-0.007).round_to(2) => '-0.01'
> # (-0.007).round_to(1) => '0.0'
> def round_to(decimals)
> if self<0 then
> s='-';
> x=-self;
> else
> s='';
> x=self;
> end
RSS Feed