Class: Druid::PostAggregationConstant
- Inherits:
-
Object
- Object
- Druid::PostAggregationConstant
- Includes:
- PostAggregationOperators
- Defined in:
- lib/druid/post_aggregation.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #as_json(*a) ⇒ Object
-
#initialize(value) ⇒ PostAggregationConstant
constructor
A new instance of PostAggregationConstant.
- #to_hash ⇒ Object
- #to_json(*a) ⇒ Object
Methods included from PostAggregationOperators
Constructor Details
#initialize(value) ⇒ PostAggregationConstant
Returns a new instance of PostAggregationConstant.
105 106 107 |
# File 'lib/druid/post_aggregation.rb', line 105 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
103 104 105 |
# File 'lib/druid/post_aggregation.rb', line 103 def value @value end |
Instance Method Details
#as_json(*a) ⇒ Object
117 118 119 |
# File 'lib/druid/post_aggregation.rb', line 117 def as_json(*a) to_hash end |
#to_hash ⇒ Object
109 110 111 |
# File 'lib/druid/post_aggregation.rb', line 109 def to_hash { "type" => "constant", "value" => @value } end |
#to_json(*a) ⇒ Object
113 114 115 |
# File 'lib/druid/post_aggregation.rb', line 113 def to_json(*a) to_hash.to_json(*a) end |