Class: AGIRoute
- Inherits:
-
Object
- Object
- AGIRoute
- Defined in:
- lib/AGIRoute.rb
Overview
The AGIRoute class is meant to be subclassed and have various methods added which will work like rails controller actions, being called by the router when agi requests to certain similarly named uri’s occur. For example, an asterisk request to the agi with a url of agi://server:port/TestRoutes/test/?foo=bar would execute the test action in the TestRoutes agi route subclass.
Instance Attribute Summary collapse
-
#agi ⇒ Object
readonly
Returns the value of attribute agi.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(data) ⇒ AGIRoute
constructor
A new instance of AGIRoute.
Constructor Details
#initialize(data) ⇒ AGIRoute
Returns a new instance of AGIRoute.
37 38 39 40 41 |
# File 'lib/AGIRoute.rb', line 37 def initialize(data) @agi = data[:agi] @params = data[:params] @request = data[:request] end |
Instance Attribute Details
#agi ⇒ Object (readonly)
Returns the value of attribute agi.
36 37 38 |
# File 'lib/AGIRoute.rb', line 36 def agi @agi end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
36 37 38 |
# File 'lib/AGIRoute.rb', line 36 def params @params end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
36 37 38 |
# File 'lib/AGIRoute.rb', line 36 def request @request end |