Class: Geekmail

Inherits:
Object
  • Object
show all
Defined in:
lib/geekmail.rb

Class Method Summary collapse

Class Method Details

.runObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/geekmail.rb', line 7

def self.run
	config_location = File.expand_path("~/.geekmail.conf")
	begin
		Geekmail.check_mail(YAML.load_file(config_location)["config"])
	rescue ArgumentError => e
		"Your configuration file seems to be missconfigured: #{e}"
	rescue Errno::ENOENT => e
		"Couldn't locate your config file. Please create it as #{config_location}"
	end
end