Class: AGIRoute

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#agiObject (readonly)

Returns the value of attribute agi.



36
37
38
# File 'lib/AGIRoute.rb', line 36

def agi
  @agi
end

#paramsObject (readonly)

Returns the value of attribute params.



36
37
38
# File 'lib/AGIRoute.rb', line 36

def params
  @params
end

#requestObject (readonly)

Returns the value of attribute request.



36
37
38
# File 'lib/AGIRoute.rb', line 36

def request
  @request
end