Class: GrantFront::Engine
- Inherits:
-
Object
- Object
- GrantFront::Engine
- Defined in:
- lib/grant-front/engine.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
Returns the value of attribute request.
-
#tree ⇒ Object
Returns the value of attribute tree.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#request ⇒ Object
Returns the value of attribute request.
8 9 10 |
# File 'lib/grant-front/engine.rb', line 8 def request @request end |
#tree ⇒ Object
Returns the value of attribute tree.
8 9 10 |
# File 'lib/grant-front/engine.rb', line 8 def tree @tree end |
Class Method Details
.call(env) ⇒ Object
68 69 70 |
# File 'lib/grant-front/engine.rb', line 68 def call(env) prototype.call(env) end |
.prototype ⇒ Object
64 65 66 |
# File 'lib/grant-front/engine.rb', line 64 def prototype @prototype ||= new end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/grant-front/engine.rb', line 10 def call(env) @request = Rack::Request.new(env) status = 200 headers = {'Content-Type' => 'text/html'} body = ERB.new(application_template).result(binding) [status, headers, [body]] end |