| Class | Seed |
| In: |
lib/seed.rb
|
| Parent: | Object |
This class provides the seed part of the Gardener,Garden,Seed natural design patern
In nature, seed is usually small, and so is this class. No atributes/variables of itself, its only a kind of localized getter/setter class for the global $seed variable. Every garden row assess one fork-localized $seed variable, and you get access to it from a seed instance passed to every Abundance.grow iteration.
| Author: | lp (lp@spiralix.org) |
| Copyright: | 2008 Louis-Philippe Perron - Released under the terms of the MIT license |
The crop method for the Seed instance allow to set a success status and a return message from the inside the Abundance.grow block.
if success seed.crop(true,results) else seed.crop(false,results) end
The sprout method for the Seed instance allow to get the passed command from the inside the Abundance.grow block.
system "#{seed.sprout}\n"