Class: Druid::PostAggregation

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/druid/post_aggregation.rb

Defined Under Namespace

Classes: FieldnameValidator, FieldsValidator, FnValidator, FunctionValidator, NameValidator, ValueValidator

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



105
106
107
108
109
# File 'lib/druid/post_aggregation.rb', line 105

def method_missing(name, *args)
  if args.empty?
    PostAggregationField.new(fieldName: name)
  end
end

Instance Attribute Details

#fieldNameObject

Returns the value of attribute fieldName.



72
73
74
# File 'lib/druid/post_aggregation.rb', line 72

def fieldName
  @fieldName
end

#fieldNamesObject (readonly)

Returns the value of attribute fieldNames.



103
104
105
# File 'lib/druid/post_aggregation.rb', line 103

def fieldNames
  @fieldNames
end

#fieldsObject

Returns the value of attribute fields.



52
53
54
# File 'lib/druid/post_aggregation.rb', line 52

def fields
  @fields
end

#fnObject

Returns the value of attribute fn.



33
34
35
# File 'lib/druid/post_aggregation.rb', line 33

def fn
  @fn
end

#functionObject

Returns the value of attribute function.



100
101
102
# File 'lib/druid/post_aggregation.rb', line 100

def function
  @function
end

#nameObject

Returns the value of attribute name.



19
20
21
# File 'lib/druid/post_aggregation.rb', line 19

def name
  @name
end

#numBucketsObject

Returns the value of attribute numBuckets.



5
6
7
# File 'lib/druid/post_aggregation.rb', line 5

def numBuckets
  @numBuckets
end

#typeObject

Returns the value of attribute type.



7
8
9
# File 'lib/druid/post_aggregation.rb', line 7

def type
  @type
end

#valueObject

Returns the value of attribute value.



86
87
88
# File 'lib/druid/post_aggregation.rb', line 86

def value
  @value
end

Instance Method Details

#js(*args) ⇒ Object



111
112
113
114
115
116
117
# File 'lib/druid/post_aggregation.rb', line 111

def js(*args)
  if args.empty?
    PostAggregationField.new(fieldName: :js)
  else
    PostAggregationJavascript.new(args.first)
  end
end