module Zenps

Zenps ruby wrapper

Public Class Methods

config() click to toggle source
# File lib/zenps-ruby.rb, line 32
def self.config
  @config
end
configure(options = {}) click to toggle source

Configure through hash

# File lib/zenps-ruby.rb, line 18
def self.configure(options = {})
  options.each { |k, v| @config[k.to_sym] = v if @valid_config_keys.include? k.to_sym }
end
configure_with(path_to_yaml_file) click to toggle source

Configure through yaml file

# File lib/zenps-ruby.rb, line 23
def self.configure_with(path_to_yaml_file)
  begin
    config = YAML.safe_load(IO.read(path_to_yaml_file))
  rescue Errno::ENOENT
    raise ConfigurationPathError
  end
  configure(config)
end