# Using \<\< to append/add

**URL:** <https://www.ruby-forum.com/t/using-to-append-add/119956>\
**Category:** Ruby-Gnome 2\
**Created:** [November 12, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/using-to-append-add/119956 "2007-11-12T15:27:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [November 12, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/using-to-append-add/119956/1 "2007-11-12T15:27:15Z")

</div>

Hi,

I am using Gtk::Entry and one thing I quite like in Ruby is the \<\<  
ability to just append something onto an object, ie. mostly to a String  
or Array.

I.e. on an already existing Gtk::Entry to \<\< append text. I think using  
\<\< is not very common in ruby-gnome so far. I believe \<\< can be used for  
Gtk::Window, and maybe at some other places, but I was wondering whether  
\<\< should maybe also work for objects like Gtk::Entry, which basically  
just store a text.

PS: This is just a suggestion of course, I totally understand if we want  
to stick to Gtk API and not use too many ruby-only constructs 🙂

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [November 12, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/using-to-append-add/119956/2 "2007-11-12T17:36:43Z")

</div>

Nice idea, i like it. Btw. it works for all subclasses of Gtk::Bin

Cheers  
detlef

Am Montag, den 12.11.2007, 15:27 +0100 schrieb Marc H.:
