Method: HookApp#open_linked

Defined in:
lib/hook/hookapp.rb

#open_linked(url) ⇒ Object

Select from a menu of available hooks and open using macOS ‘open`.



333
334
335
336
337
338
339
340
341
# File 'lib/hook/hookapp.rb', line 333

def open_linked(url)
  marks = get_hooks(url)
  if marks.empty?
    warn "No hooks found for #{url}"
  else
    res = select_hook(marks)
    res.each { |mark| `open '#{mark[:url]}'` } unless res.empty?
  end
end