Class: AppUp::HookRunner

Inherits:
Struct
  • Object
show all
Defined in:
lib/app_up/hook_runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#filesObject

Returns the value of attribute files



4
5
6
# File 'lib/app_up/hook_runner.rb', line 4

def files
  @files
end

#optionsObject

Returns the value of attribute options



4
5
6
# File 'lib/app_up/hook_runner.rb', line 4

def options
  @options
end

#shellObject

Returns the value of attribute shell



4
5
6
# File 'lib/app_up/hook_runner.rb', line 4

def shell
  @shell
end

Instance Method Details

#runObject



6
7
8
9
10
11
12
13
14
# File 'lib/app_up/hook_runner.rb', line 6

def run
  hooks = HookLoader.load

  hooks.each do |hook|
    hook.run(shell, files, options)
  end

  shell.flush
end