Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #7175
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Robert Klemme <shortcutter@googlemail.com> |
| Newsgroups | comp.lang.ruby |
| Subject | Re: getting in between results of chunks of ruby code, by how??? |
| Date | Wed, 23 Dec 2015 11:14:28 +0100 |
| Lines | 29 |
| Message-ID | <ddvag6Fug3jU1@mid.individual.net> (permalink) |
| References | <5fc33a05-0c6f-4082-a815-3dc044b13cff@googlegroups.com> <ddu37fFlkt1U1@mid.individual.net> <b368625d-aa48-44e2-a0bf-642e0975223f@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net RGaWDZZdVu7EBVqb9uTpBArJ9AQWcU6Ncifk3pkQQwRQ5lw2g= |
| Cancel-Lock | sha1:Z8vBmrQKQmXyLQtwmWb/AoQay4o= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
| In-Reply-To | <b368625d-aa48-44e2-a0bf-642e0975223f@googlegroups.com> |
| Xref | csiph.com comp.lang.ruby:7175 |
Show key headers only | View raw
On 23.12.2015 10:37, artbot wrote: > it's going to be part of my (very specialized) template engine. And what makes it special? What are your requirements etc.? > it should be as code/ruby agnostic as possible. evaluating each block > should just recognize if it produces a result or not. also repetitions > should get recognized (as above) You cannot recognize that and be Ruby agnostic at the same time. Just look at your example: you have a block there as second array element which is invoked an unknown number of times by the first chunk. So you would somehow have to tap into the callback from #times and store all evaluation results of the block's body etc. No way this flies by only being mildly Ruby agnostic. > any more ideas? You provide the requirements, others can come up with ideas. Regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
Back to comp.lang.ruby | Previous | Next — Previous in thread | Next in thread | Find similar
getting in between results of chunks of ruby code, by how??? artbot <am@artbot.de> - 2015-12-22 12:13 -0800
Re: getting in between results of chunks of ruby code, by how??? Robert Klemme <shortcutter@googlemail.com> - 2015-12-23 00:04 +0100
Re: getting in between results of chunks of ruby code, by how??? artbot <am@artbot.de> - 2015-12-23 01:37 -0800
Re: getting in between results of chunks of ruby code, by how??? Robert Klemme <shortcutter@googlemail.com> - 2015-12-23 11:14 +0100
Re: getting in between results of chunks of ruby code, by how??? artbot <am@artbot.de> - 2015-12-23 05:49 -0800
Re: getting in between results of chunks of ruby code, by how??? artbot <am@artbot.de> - 2015-12-23 11:02 -0800
csiph-web