From: sto.mar@... Date: 2013-08-05T03:02:04+09:00 Subject: Re: Using % for printng strings Am 04.08.2013 19:45, schrieb David Acosta: > Hello comunity, I'm trying some code from ruby cookbook, and i have > this: > > %{Here is number #{class InstantClass > def bar > "Some text" > end > end > InstantClass.new.bar > }.} > > It is supposed to print me "Here is Some text" but, it doesn't bring me > anything. > > What can i do in this case o what could be the reason why it doesn't > show anything? You do not do anything with the string. Use `puts %{...}' to output the string to screen or enter it into irb (which by default outputs the value of all entered expressions) Regards, Marcus -- GitHub: https://github.com/stomar/ PGP: 0x6B3A101A