Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Sidney Reilley Newsgroups: comp.lang.ruby Subject: Re: making a class in irb Date: Sat, 20 Nov 2021 21:24:30 -0700 Organization: A noiseless patient Spider Lines: 22 Message-ID: <20211120212430.8ea32fd1bd2bca77c7c31162@gmail.com> References: <85cf4fdd-ead4-43bf-9be7-796f009f11d0n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: reader02.eternal-september.org; posting-host="ce38320210326fccd8c95f4a70621a20"; logging-data="14740"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190QZe8eNvJPE7A5cpAf2Ls" Cancel-Lock: sha1:xaG1eA8WRDUBFbvog2niOMtWNus= X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Xref: csiph.com comp.lang.ruby:7451 On Sat, 20 Nov 2021 11:39:17 -0800 (PST) BeeRich33 wrote: > On Friday, November 19, 2021 at 12:38:06 PM UTC-5, Sidney Reilley > wrote: > > Ruby noob here! Using irb to learn. > > Best to use a different environment. > > - install the filewatcher gem > - create a test file named app.rb with proper ruby headers at the > top > - create an alias in your .bash_profile like this: > > kk='filewatcher "/users/sidney/app.rb" "clear; > ruby /users/sidney/app.rb"' > > in the terminal, type kk, and it will be running. When you edit > the file and save it, it will run in the terminal. This is a > much better option than irb. Good stuff! Thx for heads up for this useful solution.