Class: Rack::Auth::Simples

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/auth/simples.rb,
lib/rack/auth/simples/rules.rb,
lib/rack-auth-simples/version.rb

Defined Under Namespace

Classes: Rules

Constant Summary collapse

VERSION =
"0.0.10"

Instance Method Summary collapse

Constructor Details

#initialize(app, &block) ⇒ Simples

Returns a new instance of Simples.



6
7
8
9
10
11
12
# File 'lib/rack/auth/simples.rb', line 6

def initialize app, &block
	@rules = Rules.new

	block.call(@rules)

  @app = app
end

Instance Method Details

#call(env) ⇒ Object



14
15
16
17
18
# File 'lib/rack/auth/simples.rb', line 14

def call env

  @rules.parse env, @app
  
end