Class: Druid::Context
- Inherits:
-
Object
- Object
- Druid::Context
- Includes:
- ActiveModel::Model
- Defined in:
- lib/druid/context.rb
Instance Attribute Summary collapse
-
#bySegment ⇒ Object
Returns the value of attribute bySegment.
-
#chunkPeriod ⇒ Object
Returns the value of attribute chunkPeriod.
-
#finalize ⇒ Object
Returns the value of attribute finalize.
-
#populateCache ⇒ Object
Returns the value of attribute populateCache.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#queryId ⇒ Object
Returns the value of attribute queryId.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#useCache ⇒ Object
Returns the value of attribute useCache.
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
-
#initialize(attributes = {}) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(attributes = {}) ⇒ Context
Returns a new instance of Context.
27 28 29 30 |
# File 'lib/druid/context.rb', line 27 def initialize(attributes = {}) super @queryId ||= SecureRandom.uuid end |
Instance Attribute Details
#bySegment ⇒ Object
Returns the value of attribute bySegment.
19 20 21 |
# File 'lib/druid/context.rb', line 19 def bySegment @bySegment end |
#chunkPeriod ⇒ Object
Returns the value of attribute chunkPeriod.
25 26 27 |
# File 'lib/druid/context.rb', line 25 def chunkPeriod @chunkPeriod end |
#finalize ⇒ Object
Returns the value of attribute finalize.
22 23 24 |
# File 'lib/druid/context.rb', line 22 def finalize @finalize end |
#populateCache ⇒ Object
Returns the value of attribute populateCache.
16 17 18 |
# File 'lib/druid/context.rb', line 16 def populateCache @populateCache end |
#priority ⇒ Object
Returns the value of attribute priority.
8 9 10 |
# File 'lib/druid/context.rb', line 8 def priority @priority end |
#queryId ⇒ Object
Returns the value of attribute queryId.
11 12 13 |
# File 'lib/druid/context.rb', line 11 def queryId @queryId end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/druid/context.rb', line 5 def timeout @timeout end |
#useCache ⇒ Object
Returns the value of attribute useCache.
13 14 15 |
# File 'lib/druid/context.rb', line 13 def useCache @useCache end |
Instance Method Details
#as_json(options = {}) ⇒ Object
32 33 34 |
# File 'lib/druid/context.rb', line 32 def as_json( = {}) super(.merge(except: %w(errors validation_context))) end |