Module: SimpleTemplater::Hooks::DSL

Defined in:
lib/simple-templater/hooks/hook.rb

Instance Method Summary collapse

Instance Method Details

#hook(key, question, &block) ⇒ Object


15
16
17
18
19
20
21
# File 'lib/simple-templater/hooks/hook.rb', line 15

def hook(key, question, &block)
  Class.new(Hook.new) do
    def key() key; end
    def question() question; end
    def run() block.call; end
  end
end