Class: Druid::PostAggregationConstant
- Inherits:
-
Object
- Object
- Druid::PostAggregationConstant
- 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
Constructor Details
#initialize(value) ⇒ PostAggregationConstant
Returns a new instance of PostAggregationConstant.
95 96 97 |
# File 'lib/druid/post_aggregation.rb', line 95 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
93 94 95 |
# File 'lib/druid/post_aggregation.rb', line 93 def value @value end |
Instance Method Details
#as_json(*a) ⇒ Object
107 108 109 |
# File 'lib/druid/post_aggregation.rb', line 107 def as_json(*a) to_hash end |
#to_hash ⇒ Object
99 100 101 |
# File 'lib/druid/post_aggregation.rb', line 99 def to_hash { "type" => "constant", "value" => @value } end |
#to_json(*a) ⇒ Object
103 104 105 |
# File 'lib/druid/post_aggregation.rb', line 103 def to_json(*a) to_hash.to_json(*a) end |