class Lolerrors::Adapter

Public Class Methods

get_adapter() click to toggle source
# File lib/lolerrors/adapters/adapter.rb, line 23
def self.get_adapter
  return ::Lolerrors::OSXAdapter.new if OS.mac?
  return ::Lolerrors::LinuxAdapter.new if OS.linux?
  return ::Lolerrors::Adapter.new
end

Public Instance Methods

capture(message) click to toggle source
# File lib/lolerrors/adapters/adapter.rb, line 3
def capture(message)
  raise NotImplementedError("Must use concrete subclass for capture")
end
gif_file_path() click to toggle source
# File lib/lolerrors/adapters/adapter.rb, line 15
def gif_file_path
  "#{save_location}/snapshot.gif"
end
rename_gif() click to toggle source
# File lib/lolerrors/adapters/adapter.rb, line 7
def rename_gif
  %x( mv #{gif_file_path} ~/lolerrors/snapshot_#{Time.now.to_i}.gif )
end
save_location() click to toggle source
# File lib/lolerrors/adapters/adapter.rb, line 19
def save_location
  '~/lolerrors'
end
video_file_path() click to toggle source
# File lib/lolerrors/adapters/adapter.rb, line 11
def video_file_path
  "#{save_location}/snapshot.mov"
end