Class: Tzispa::Controller::Base
- Inherits:
-
Object
- Object
- Tzispa::Controller::Base
- Includes:
- Helpers::Hooks::After, Helpers::Hooks::Before
- Defined in:
- lib/tzispa/controller/base.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
-
#callmethod ⇒ Object
readonly
Returns the value of attribute callmethod.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#context_class ⇒ Object
readonly
Returns the value of attribute context_class.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, callmethod, context_class = Tzispa::Context) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(app, callmethod, context_class = Tzispa::Context) ⇒ Base
Returns a new instance of Base.
17 18 19 20 21 |
# File 'lib/tzispa/controller/base.rb', line 17 def initialize(app, callmethod, context_class = Tzispa::Context) @application = app @callmethod = callmethod @context_class = context_class 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 |
#callmethod ⇒ Object (readonly)
Returns the value of attribute callmethod.
15 16 17 |
# File 'lib/tzispa/controller/base.rb', line 15 def callmethod @callmethod 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 |
#context_class ⇒ Object (readonly)
Returns the value of attribute context_class.
15 16 17 |
# File 'lib/tzispa/controller/base.rb', line 15 def context_class @context_class end |
Instance Method Details
#call(env) ⇒ Object
23 24 25 26 |
# File 'lib/tzispa/controller/base.rb', line 23 def call(env) @context = context_class.new(application, env) invoke end |