Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > overloading << operator

Thread Tools

overloading << operator

Carl Youngblood
Posts: n/a
How do I create a class that will allow me to pass a string, for
example, to an instance of it using the << operator? Like this:

class Logger
include Singleton
$logger = Logger.instance
$logger << "Here is a log message"


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
overloading operator->*() and operator->() C++ 2 02-21-2009 04:26 AM
overloading operator->*() and operator->() C++ 11 02-20-2009 08:52 PM
user defined conversion operator or operator overloading? hurcan solter C++ 3 08-29-2007 07:39 PM
Why is overloading operator. (member operator) forbidden? C++ 11 05-16-2007 07:54 PM
Operator overloading on "default" operator John Smith C++ 2 10-06-2004 10:22 AM