Class: AppUp::Hooks::Runner

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#filesObject

Returns the value of attribute files



5
6
7
# File 'lib/app_up/hooks/runner.rb', line 5

def files
  @files
end

#optionsObject

Returns the value of attribute options



5
6
7
# File 'lib/app_up/hooks/runner.rb', line 5

def options
  @options
end

#shellObject

Returns the value of attribute shell



5
6
7
# File 'lib/app_up/hooks/runner.rb', line 5

def shell
  @shell
end

Instance Method Details

#runObject



7
8
9
10
11
12
13
14
15
# File 'lib/app_up/hooks/runner.rb', line 7

def run
  hooks = Hooks::Loader.load

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

  shell.flush
end