Method: HookApp#encode

Defined in:
lib/hook/hookapp.rb

#encode(string) ⇒ Object



557
558
559
560
561
562
563
564
# File 'lib/hook/hookapp.rb', line 557

def encode(string)
  result = `osascript <<'APPLESCRIPT'
tell application "#{HOOK_APP}"
percent encode "#{string.escape_quotes}"
end tell
APPLESCRIPT`.strip.gsub(/'/,'%27')
  print result
end