class MobileInfo

Public Class Methods

parse(method, path, query) click to toggle source
# File Paths/MobileInfo.rb, line 7
def self.parse(method, path, query)
  dputs(3) { "Got #{method} - #{path} - #{query}" }
  ERB.new(File.open('Files/mobileinfo.erb') { |f| f.read }).result(binding)
end
send_email() click to toggle source
# File Paths/MobileInfo.rb, line 12
def self.send_email
  File.open('/tmp/status.html', 'w') { |f|
    f.write(ERB.new(File.open('Files/mobileinfo.erb') { |f| f.read }).result(binding))
  }
  System.run_bool('echo ".-=-." | mail -a /tmp/status.html -s "$( hostname ): Connected" root@localhost')
  log_msg :MobileInfo, 'Sent e-mail'
end