module Dutchman::GhostWriter

Public Class Methods

apple_script(params) click to toggle source
# File lib/dutchman/ghost_writer/ghost_writer.rb, line 17
def self.apple_script(params)
  app = AppleScript.new.app(params[:application])
  app.typed_phrase(params[:text],params[:speed])
  app.execute
end
speed(value,humanize) click to toggle source
# File lib/dutchman/ghost_writer/ghost_writer.rb, line 23
def self.speed(value,humanize)
  TypingSpeed.new(value,humanize)
end
write(params) click to toggle source

@params params [Hash] the parameters :application, :text, :speed

# File lib/dutchman/ghost_writer/ghost_writer.rb, line 11
def self.write(params)
  params[:speed] = speed(params[:speed],params[:humanize])
  # TODO: Platform Switching Here
  apple_script(params)
end