class Rack::Auth::Config

Public Class Methods

new(options = { file: './gitlab.yml'}) click to toggle source
# File lib/rack/auth/gitlabapi.rb, line 11
def initialize(options = { file: './gitlab.yml'})
  @values = ::YAML.load_file(::File.expand_path(options[:file], Dir.pwd))
  @values.keys.each do |key|
    @values[key.to_sym] = @values.delete(key)
  end
  @values.keys.each do |meth|
    bloc = Proc.new  {@values[meth] }
      self.class.send :define_method, meth, &bloc
  end
end