Class: Lam::BaseController
- Inherits:
-
Object
- Object
- Lam::BaseController
- Defined in:
- lib/lam/base_controller.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event, context) ⇒ BaseController
constructor
A new instance of BaseController.
-
#lambda_functions ⇒ Object
The public methods defined in the user’s custom class will become lambda functions.
Constructor Details
#initialize(event, context) ⇒ BaseController
Returns a new instance of BaseController.
6 7 8 9 |
# File 'lib/lam/base_controller.rb', line 6 def initialize(event, context) @event = event @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
5 6 7 |
# File 'lib/lam/base_controller.rb', line 5 def context @context end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
5 6 7 |
# File 'lib/lam/base_controller.rb', line 5 def event @event end |
Class Method Details
.lambda_functions ⇒ Object
20 21 22 |
# File 'lib/lam/base_controller.rb', line 20 def self.lambda_functions new(nil, nil).lambda_functions end |
Instance Method Details
#lambda_functions ⇒ Object
The public methods defined in the user’s custom class will become lambda functions. Returns Example:
["FakeController#handler1", "FakeController#handler2"]
15 16 17 18 |
# File 'lib/lam/base_controller.rb', line 15 def lambda_functions # public_instance_methods(false) - to not include inherited methods self.class.public_instance_methods(false) - Object.public_instance_methods end |