Module: Garden::Rows::Paths
- Included in:
- Garden::Rows
- Defined in:
- lib/rows_paths.rb
Overview
The Paths module is a set of method used by the Rows’s forks. You will not need to use these methods unless you plan on refactoring the Rows.
- Author
-
lp ([email protected])
- Copyright
-
2008 Louis-Philippe Perron - Released under the terms of the MIT license
:title:Rows
Instance Method Summary collapse
- #all(message_block) ⇒ Object
- #crop ⇒ Object
- #init ⇒ Object
- #quit ⇒ Object
- #sprout(message_block) ⇒ Object
Instance Method Details
#all(message_block) ⇒ Object
11 12 13 |
# File 'lib/rows_paths.rb', line 11 def all() $seed = {:id => Process.pid, :seed => [2], :all => true} end |
#crop ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/rows_paths.rb', line 15 def crop if $seed[:all] socket_send([:crop,:seed_all,$seed,@garden_path]) else socket_send([:crop,:harvest,$seed,@garden_path]) end $seed = nil end |
#init ⇒ Object
24 25 26 27 |
# File 'lib/rows_paths.rb', line 24 def init $init = {:seed => 'init_status', :success => false, :message => 'No Init Message', :id => Process.pid} if $init.nil? socket_send([:crop,:init,$init,@garden_path]) end |
#quit ⇒ Object
29 30 31 32 |
# File 'lib/rows_paths.rb', line 29 def quit socket_send([:close,:row,Process.pid,@garden_path]) Kernel::exit end |
#sprout(message_block) ⇒ Object
34 35 36 |
# File 'lib/rows_paths.rb', line 34 def sprout() $seed = [2] end |