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 14 |
# File 'lib/rows_paths.rb', line 11 def all() $log_abundance.debug("Rows::Paths") {"all"} $seed = {:id => Process.pid, :seed => [2], :all => true} end |
#crop ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/rows_paths.rb', line 16 def crop $log_abundance.debug("Rows::Paths") {"crop, seed: #{$seed.inspect}"} 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
26 27 28 29 30 |
# File 'lib/rows_paths.rb', line 26 def init $log_abundance.debug("Rows::Paths") {"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
32 33 34 35 36 |
# File 'lib/rows_paths.rb', line 32 def quit $log_abundance.debug("Rows::Paths") {"quit"} socket_send([:close,:row,Process.pid,@garden_path]) Thread::exit end |
#sprout(message_block) ⇒ Object
38 39 40 41 |
# File 'lib/rows_paths.rb', line 38 def sprout() $log_abundance.debug("Rows::Paths") {"sprout"} $seed = [2] end |