Class: EsiForRack::Lookup::Http
- Inherits:
-
Object
- Object
- EsiForRack::Lookup::Http
- Defined in:
- lib/esi_for_rack/lookup.rb
Defined Under Namespace
Classes: RedirectFollower
Instance Method Summary collapse
- #[](path) ⇒ Object
-
#initialize(app, env) ⇒ Http
constructor
A new instance of Http.
Constructor Details
#initialize(app, env) ⇒ Http
Returns a new instance of Http.
57 58 59 60 |
# File 'lib/esi_for_rack/lookup.rb', line 57 def initialize(app, env) @app = app @env = env end |
Instance Method Details
#[](path) ⇒ Object
62 63 64 65 |
# File 'lib/esi_for_rack/lookup.rb', line 62 def [](path) res = RedirectFollower.new(path).resolve res.body if res.code == '200' end |