Module: Plug::Configuration

Included in:
Plug
Defined in:
lib/plug/configuration.rb

Constant Summary collapse

AUTH_USER =
''
AUTH_PASSWORD =
''
ALLOW_DELETE =
true
VALID_OPTIONS_KEYS =
[
  :auth_user,
  :auth_password,
  :allow_delete
].freeze

Instance Method Summary collapse

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



15
16
17
# File 'lib/plug/configuration.rb', line 15

def configure
  yield self
end

#optionsObject



19
20
21
# File 'lib/plug/configuration.rb', line 19

def options
  Hash[ * VALID_OPTIONS_KEYS.map { |key| [key, send(key)] }.flatten ]
end