Class: Tzispa::Controller::Base
- Inherits:
-
Object
- Object
- Tzispa::Controller::Base
- Extended by:
- Forwardable
- Includes:
- Helpers::ErrorView
- Defined in:
- lib/tzispa/controller/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, callmethod = nil) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(app, callmethod = nil) ⇒ Base
Returns a new instance of Base.
18 19 20 21 |
# File 'lib/tzispa/controller/base.rb', line 18 def initialize(app, callmethod=nil) @callmethod = callmethod @application = app end |
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application.
15 16 17 |
# File 'lib/tzispa/controller/base.rb', line 15 def application @application end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
15 16 17 |
# File 'lib/tzispa/controller/base.rb', line 15 def context @context end |
Instance Method Details
#call(env) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/tzispa/controller/base.rb', line 23 def call(env) @context = Tzispa::Http::Context.new(@application, env) #env[Tzispa::ENV_TZISPA_CONTEXT] = @context #@context = env[Tzispa::ENV_TZISPA_CONTEXT] invoke @callmethod if @callmethod response.finish end |