Class: Hadley::Middleware
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Hadley::Middleware
- Includes:
- Authz
- Defined in:
- lib/hadley/middleware.rb
Instance Attribute Summary collapse
-
#confg ⇒ Object
readonly
Returns the value of attribute confg.
Instance Method Summary collapse
-
#initialize(app = nil, options = {}) {|@config| ... } ⇒ Middleware
constructor
A new instance of Middleware.
Methods included from Authz
Constructor Details
#initialize(app = nil, options = {}) {|@config| ... } ⇒ Middleware
Returns a new instance of Middleware.
7 8 9 10 11 12 13 |
# File 'lib/hadley/middleware.rb', line 7 def initialize(app=nil, ={}) super(app) @config ||= Hadley::Config.new() yield @config if block_given? @tokens = @config.token_store self end |
Instance Attribute Details
#confg ⇒ Object (readonly)
Returns the value of attribute confg.
5 6 7 |
# File 'lib/hadley/middleware.rb', line 5 def confg @confg end |