Class: Trocla::Hooks::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/trocla/hooks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(trocla) ⇒ Runner

Returns a new instance of Runner.



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

def initialize(trocla)
  @trocla = trocla
end

Instance Attribute Details

#troclaObject (readonly)

Returns the value of attribute trocla.



4
5
6
# File 'lib/trocla/hooks.rb', line 4

def trocla
  @trocla
end

Instance Method Details

#run(action, key, format, options) ⇒ Object



9
10
11
12
13
14
# File 'lib/trocla/hooks.rb', line 9

def run(action, key, format, options)
  return unless hooks[action]
  hooks[action].each do |cmd|
    Trocla::Hooks.send(cmd, trocla, key, format, options)
  end
end