Class Rudy::Routines::Passthrough

  1. lib/rudy/routines/passthrough.rb

Methods

public instance

  1. execute
  2. init
  3. raise_early_exceptions

Public instance methods

execute ()
[show source]
    # File lib/rudy/routines/passthrough.rb, line 16
16:     def execute
17:       Rudy::Routines::Handlers::Depends.execute_all @before, @argv
18:       li " Executing routine: #{@name} ".att(:reverse), ""
19:       # Re-retreive the machine set to reflect dependency changes
20:       Rudy::Routines.rescue {
21:         @machines = Rudy::Machines.list || []
22:         @@rset = Rudy::Routines::Handlers::RyeTools.create_set @machines
23:       }
24:       
25:       return @machines unless run?
26:       Rudy::Routines.runner(@routine, @@rset, @@lbox, @argv)
27:       Rudy::Routines::Handlers::Depends.execute_all @after, @argv
28:       @machines
29:     end
init (*args)
[show source]
    # File lib/rudy/routines/passthrough.rb, line 9
 9:     def init(*args)
10:       Rudy::Routines.rescue {
11:         @machines = Rudy::Machines.list || []
12:         @@rset = Rudy::Routines::Handlers::RyeTools.create_set @machines
13:       }
14:     end
raise_early_exceptions ()

Called by generic_machine_runner

[show source]
    # File lib/rudy/routines/passthrough.rb, line 32
32:     def raise_early_exceptions
33:       raise Rudy::Error, "No routine name" unless @name
34:       raise NoRoutine, @name unless @routine
35:       ##raise MachineGroupNotDefined, current_machine_group unless known_machine_group?
36:       # Call raise_early_exceptions for each handler used in the routine
37:       @routine.each_pair do |action,definition|
38:         raise NoHandler, action unless Rudy::Routines.has_handler?(action)
39:         handler = Rudy::Routines.get_handler action
40:         handler.raise_early_exceptions(action, definition, @@rset, @@lbox, @argv)
41:       end
42:     end