[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

creating a ! method

Kurt V. Hindenburg

6/13/2005 5:52:00 PM

Hello,
I have this code. It works fine but I would like to use round_to_interval!.
I could not figure out how to code that. Any suggestions?

class Time
def round_to_interval!
# how?
end

def round_to_interval
self - (self.min % 10) * 60
end
end

Regards,
Kurt


26 Answers

Jamis Buck

6/13/2005 5:55:00 PM

0


On Jun 13, 2005, at 11:51 AM, Kurt V. Hindenburg wrote:

> Hello,
> I have this code. It works fine but I would like to use
> round_to_interval!.
> I could not figure out how to code that. Any suggestions?
>
> class Time
> def round_to_interval!
> # how?
> end
>
> def round_to_interval
> self - (self.min % 10) * 60
> end
> end
>
>

Time objects are immutable (like numbers, symbols, etc.), so you
cannot alter them directly.

- Jamis


marston shores

8/20/2012 9:18:00 PM

0

On Mon, 20 Aug 2012 14:57:55 -0600, Jazzy Belle <fvrnite@yahoo.com> wrote:

> On Aug 20, 3:46 pm, "marston shores" <k...@fa.ith> wrote:
>> But the young lady and her hacker friend Kent have not entered.
>>
>> Their demons are too strong to allow them to face spiritual cleansing.
>
> Liar Marston. As I am posting this I am ON Chatnet and "#bob-larson"
> is not there.
>
> Take a good look at the time stamps on both our posts. Fifteen
> minutes.
>
> Moe

irc://us.chatnet.org/#bob-larson

marston shores

8/20/2012 9:22:00 PM

0

On Mon, 20 Aug 2012 14:57:55 -0600, Jazzy Belle <fvrnite@yahoo.com> wrote:

> On Aug 20, 3:46 pm, "marston shores" <k...@fa.ith> wrote:
>> But the young lady and her hacker friend Kent have not entered.
>>
>> Their demons are too strong to allow them to face spiritual cleansing.
>
> Liar Marston. As I am posting this I am ON Chatnet and "#bob-larson"
> is not there.
>
> Take a good look at the time stamps on both our posts. Fifteen
> minutes.
>
> Moe

Your demon is winning, young lady. You lack the strength and will to
overcome it's hold upon you.

[14:22:59] marstonshores [~marston@E2A85B08.F3848D0D.82F36A80.IP] has
joined #bob-larson
[14:23:01] Channel was created at Mon Aug 20 14:22:51 2012
[14:23:06] Channel synchronized in 6.0 seconds
[14:37:22] <@marstonshores> Bob offers spiritual recovery and guidance to
all who seek it. http://www.bobl...
https://www.youtube.com/watch?v=wca6sJxj32U&feat...
[14:53:57] <@marstonshores> Come forth and speak young lady, face your
demons and restore your faith in Christ!
[15:02:20] <@marstonshores>
https://www.youtube.com/watch?feature=endscreen&v=d_PaX8DcT6...
[15:07:26] Connection to server lost
[15:07:40] newbie|2 [~marston@E2A85B08.F3848D0D.82F36A80.IP] has joined
#bob-larson
[15:07:40] marstonshores [~marston@E2A85B08.F3848D0D.82F36A80.IP] has quit
IRC: Broken pipe
[15:07:42] Channel was created at Mon Aug 20 14:22:51 2012
[15:07:46] Channel synchronized in 6.0 seconds
[15:08:53] newbie|2 [~marston@E2A85B08.F3848D0D.82F36A80.IP] is now known
as marstonshores
[15:09:11] <marstonshores> I await you and your demons, young lady.
[15:10:46] <marstonshores>
https://www.youtube.com/watch?feature=endscreen&v=d_PaX8DcT6...
[15:12:16] <marstonshores> Enter now and speak on this channel, young lady!
[15:15:00] <marstonshores> Come now young lady, cat got your tongue?
[15:16:50] <marstonshores> irc://us.chatnet.org/#bob-larson
[15:18:55] <marstonshores> I await your presence, young lady.

marston shores

8/20/2012 9:42:00 PM

0

On Mon, 20 Aug 2012 14:57:55 -0600, Jazzy Belle <fvrnite@yahoo.com> wrote:


> Liar Marston. As I am posting this I am ON Chatnet and "#bob-larson"
> is not there.


Take The Demon Test Online! http://www.Dem... .

Lady Azure, Baroness of the North Pole

8/21/2012 7:05:00 AM

0



Jazzy Belle wrote:

> On Aug 20, 3:46 pm, "marston shores" <k...@fa.ith> wrote:
> > But the young lady and her hacker friend Kent have not entered.
> >
> > Their demons are too strong to allow them to face spiritual cleansing.
>
> Liar Marston. As I am posting this I am ON Chatnet

2 Places at Once, doesn't make you the Internet God!

Lady Azure, Baroness of the North Pole

8/21/2012 7:06:00 AM

0



marston shores wrote:

> On Mon, 20 Aug 2012 14:57:55 -0600, Jazzy Belle <fvrnite@yahoo.com> wrote:
>
> > On Aug 20, 3:46 pm, "marston shores" <k...@fa.ith> wrote:
> >> But the young lady and her hacker friend Kent have not entered.
> >>
> >> Their demons are too strong to allow them to face spiritual cleansing.
> >
> > Liar Marston. As I am posting this I am ON Chatnet and "#bob-larson"
> > is not there.
> >
> > Take a good look at the time stamps on both our posts. Fifteen
> > minutes.
> >
> > Moe
>
> Chicago.Il.US.ChatNet.Org
>
> @#bob-larson
>
> I do not see you in the channel I have created, young lady.
>
> Is your demon blocking your chat program?

Your a SOCK, which Figures!
Bob Larson, however wasn't expected!

Kent Wills

8/21/2012 9:25:00 AM

0

On Mon, 20 Aug 2012 13:57:55 -0700 (PDT), Jazzy Belle
<fvrnite@yahoo.com> wrote:

>On Aug 20, 3:46?pm, "marston shores" <k...@fa.ith> wrote:
>> But the young lady and her hacker friend Kent have not entered.
>>
>> Their demons are too strong to allow them to face spiritual cleansing.
>
>Liar Marston. As I am posting this I am ON Chatnet and "#bob-larson"
>is not there.
>
> Take a good look at the time stamps on both our posts. Fifteen
>minutes.
>

I think it's funny that Marston's demon is compelling him to LIE
and claim I am a hacker.
I anxiously await the evidence he'll present to support, or prove,
his claim. Since it's another of his demon inspired lies, he'll not be
able to offer any evidence.

--
"Hail imp," shouted Vlad, the Imp Hailer.

Lady Azure, Baroness of the North Pole

8/22/2012 8:13:00 AM

0



K Wills wrote:

> On Mon, 20 Aug 2012 13:57:55 -0700 (PDT), Jazzy Belle
> <fvrnite@yahoo.com> wrote:
>
> >On Aug 20, 3:46 pm, "marston shores" <k...@fa.ith> wrote:
> >> But the young lady and her hacker friend Kent have not entered.
> >>
> >> Their demons are too strong to allow them to face spiritual cleansing.
> >
> >Liar Marston. As I am posting this I am ON Chatnet and "#bob-larson"
> >is not there.
> >
> > Take a good look at the time stamps on both our posts. Fifteen
> >minutes.
> >
>
> I think it's funny that Marston's demon is compelling him to LIE
> and claim I am a hacker.
> I anxiously await the evidence he'll present to support, or prove,
> his claim. Since it's another of his demon inspired lies, he'll not be
> able to offer any evidence.

The Taps on the Lines, Document, the TRUTH, no matter how you play games with
Servers!

Kent Wills

8/22/2012 1:03:00 PM

0

On Wed, 22 Aug 2012 00:12:42 -0800, "Lady Azure, Baroness of the North
Pole" <laddie'o'lugh@gall's.org> wrote:

>
>
>K Wills wrote:
>
>> On Mon, 20 Aug 2012 13:57:55 -0700 (PDT), Jazzy Belle
>> <fvrnite@yahoo.com> wrote:
>>
>> >On Aug 20, 3:46 pm, "marston shores" <k...@fa.ith> wrote:
>> >> But the young lady and her hacker friend Kent have not entered.
>> >>
>> >> Their demons are too strong to allow them to face spiritual cleansing.
>> >
>> >Liar Marston. As I am posting this I am ON Chatnet and "#bob-larson"
>> >is not there.
>> >
>> > Take a good look at the time stamps on both our posts. Fifteen
>> >minutes.
>> >
>>
>> I think it's funny that Marston's demon is compelling him to LIE
>> and claim I am a hacker.
>> I anxiously await the evidence he'll present to support, or prove,
>> his claim. Since it's another of his demon inspired lies, he'll not be
>> able to offer any evidence.
>
>The Taps on the Lines,

I don't have a land line. I use a cell phone for telephone
calls, and cable for Internet access. There are no lines to tap.
That aside, I don't think Marston is eavesdropping on me. If he
is, he's probably using any phone conversations to help lull him to
sleep.

> Document,

Google stores my Usenet posts, along with anything I post to G+.
It's very plausible that Google archives items I post on various web
forums. Even if Google does not, I always presume someone is.
It's not paranoia. I make the presumption so that I don't post
anything that could embarrass me if it were shown on a news broadcast.

>the TRUTH, no matter how you play games with
>Servers!

I don't do anything with servers save for that which everyone
posting does. I use a server to send my posts out and to retrieve
other posts.

--
Bless me, Father, for I have committed an original sin.
I poked a badger with a spoon.

marston shores

8/22/2012 4:47:00 PM

0

On Tue, 21 Aug 2012 03:24:31 -0600, K Wills <compuelf@gmail.com> wrote:


>> Take a good look at the time stamps on both our posts. Fifteen
>> minutes.
>>
>
> I think it's funny that Marston's demon is compelling him to LIE
> and claim I am a hacker.

I think anyone who uses the term "skript kitty" as you did has tipped his
hand, friend.

> anxiously await the evidence he'll present to support, or prove,
> his claim. Since it's another of his demon inspired lies, he'll not be
> able to offer any evidence.


Your demon does not impress me Kent.