Class: ApplePush::Configuration

Inherits:
Hashr
  • Object
show all
Defined in:
lib/apple_push/configuration.rb

Class Method Summary collapse

Class Method Details

.load_file(path) ⇒ Object

Load a configuration options from file

path - Path yo YAML file



10
11
12
13
14
15
16
17
18
# File 'lib/apple_push/configuration.rb', line 10

def self.load_file(path)
  path = File.expand_path(path)

  if !File.exists?(path)
    raise ArgumentError, "File \"#{path}\" does not exist."
  end
  
  Configuration.new(YAML.load_file(path))
end