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.
37 38 39 40 |
# File 'lib/optics-agent/rack-middleware.rb', line 37 def initialize(agent, query) @agent = agent @query = query end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
36 37 38 |
# File 'lib/optics-agent/rack-middleware.rb', line 36 def agent @agent end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
36 37 38 |
# File 'lib/optics-agent/rack-middleware.rb', line 36 def query @query end |
Instance Method Details
#with_document(query_string) ⇒ Object
42 43 44 45 |
# File 'lib/optics-agent/rack-middleware.rb', line 42 def with_document(query_string) @query.document = query_string self end |