Class: Druid::PostAggregationField
- Inherits:
-
Object
- Object
- Druid::PostAggregationField
- Includes:
- PostAggregationOperators
- Defined in:
- lib/druid/post_aggregation.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #as_json(*a) ⇒ Object
- #get_field_names ⇒ Object
-
#initialize(name) ⇒ PostAggregationField
constructor
A new instance of PostAggregationField.
- #to_hash ⇒ Object
- #to_json(*a) ⇒ Object
Methods included from PostAggregationOperators
Constructor Details
#initialize(name) ⇒ PostAggregationField
Returns a new instance of PostAggregationField.
71 72 73 |
# File 'lib/druid/post_aggregation.rb', line 71 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
69 70 71 |
# File 'lib/druid/post_aggregation.rb', line 69 def name @name end |
Instance Method Details
#as_json(*a) ⇒ Object
87 88 89 |
# File 'lib/druid/post_aggregation.rb', line 87 def as_json(*a) to_hash end |
#get_field_names ⇒ Object
75 76 77 |
# File 'lib/druid/post_aggregation.rb', line 75 def get_field_names @name end |
#to_hash ⇒ Object
79 80 81 |
# File 'lib/druid/post_aggregation.rb', line 79 def to_hash { "type" => "fieldAccess", "name" => @name, "fieldName" => @name } end |
#to_json(*a) ⇒ Object
83 84 85 |
# File 'lib/druid/post_aggregation.rb', line 83 def to_json(*a) to_hash.to_json(*a) end |