lib/apple_push/configuration.rb in apple_push-0.1.1 vs lib/apple_push/configuration.rb in apple_push-0.1.2
- old
+ new
@@ -7,13 +7,14 @@
#
# path - Path yo YAML file
#
def self.load_file(path)
path = File.expand_path(path)
+
if !File.exists?(path)
raise ArgumentError, "File \"#{path}\" does not exist."
end
- data = YAML.load_file(path)
- Configuration.new(data)
+
+ Configuration.new(YAML.load_file(path))
end
end
end