Class: Rack::Auth::Config
- Inherits:
-
Object
- Object
- Rack::Auth::Config
- Defined in:
- lib/rack/auth/gitlabapi.rb
Instance Method Summary collapse
-
#initialize(options = { file: './gitlab.yml'}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(options = { file: './gitlab.yml'}) ⇒ Config
Returns a new instance of Config.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rack/auth/gitlabapi.rb', line 11 def initialize( = { file: './gitlab.yml'}) @values = ::YAML.load_file(::File.([: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 |