Class: OpticsAgent::RackAgent
- Inherits:
-
Object
- Object
- OpticsAgent::RackAgent
- Defined in:
- lib/optics-agent/rack-middleware.rb
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(agent, query) ⇒ RackAgent
constructor
A new instance of RackAgent.
- #with_document(query_string) ⇒ Object
Constructor Details
#initialize(agent, query) ⇒ RackAgent
Returns a new instance of RackAgent.
43 44 45 46 |
# File 'lib/optics-agent/rack-middleware.rb', line 43 def initialize(agent, query) @agent = agent @query = query end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
42 43 44 |
# File 'lib/optics-agent/rack-middleware.rb', line 42 def agent @agent end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
42 43 44 |
# File 'lib/optics-agent/rack-middleware.rb', line 42 def query @query end |
Instance Method Details
#with_document(query_string) ⇒ Object
48 49 50 51 |
# File 'lib/optics-agent/rack-middleware.rb', line 48 def with_document(query_string) @query.document = query_string self end |